Skip to content

Commit

Permalink
Try using reuseable actions workflow for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FayeSGW committed Dec 6, 2023
1 parent 870f285 commit b800066
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,36 @@ on:
#schedule:
# - cron: '0 0 1,5,10,15,20,25 * *'

jobs:
# jobs:

# build-publish-trigger:
# runs-on: ubuntu-latest
# env:
# DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
# DOCKER_USER: ${{ secrets.DOCKER_USER }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4

build-publish-trigger:
# - name: Build image, test it, push it dockerhub, notify dependents
# run: ./pipe_build_up_test.sh

jobs:
pre-build:
runs-on: ubuntu-latest
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v3

- name: Build image, test it, push it dockerhub, notify dependents
run: ./pipe_build_up_test.sh

build-publish:
needs: [pre-build]
permissions:
id-token: write
contents: write
uses: cyber-dojo/reusable-actions-workflows/.github/workflows/kosli_build_test_push_dockerhub.yml@main
secrets:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
KOSLI_API_TOKEN: ${{ secrets.KOSLI_API_TOKEN }}
with:
BUILD_COMMAND: pipe_build_up_test.sh
KOSLI_FLOW: java

0 comments on commit b800066

Please sign in to comment.