Skip to content

Commit

Permalink
wf: add image updater workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jimil Desai <[email protected]>
  • Loading branch information
jimil749 authored and pamfilos committed May 13, 2024
1 parent cb37f86 commit 600accb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/harbour-build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
needs: python-tests
name: Build and export server image
runs-on: ubuntu-20.04
outputs:
image-id: ${{ steps.build.outputs.image-id }}

steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +22,8 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch

- name: Build and export
- id: build
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/[email protected]
with:
dockerfile: ./docker/harbour/backend/Dockerfile
Expand All @@ -33,3 +36,17 @@ jobs:
password: ${{ secrets.HARBOR_PASSWORD }}
build-args: |
BRANCH_NAME=${{ steps.get_branch.outputs.BRANCH_NAME }}
deploy:
needs: build-image
name: update-image
runs-on: ubuntu-20.04

steps:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/[email protected]
with:
event-type: update
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES_CAP }}
repo: cern-sis/kubernetes-cap
images: |
cern-sis/cap-server@{{ needs.build-image.outputs.image-id }}
24 changes: 22 additions & 2 deletions .github/workflows/harbour-build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
needs: UITest
name: Build and export ui image
runs-on: ubuntu-20.04
outputs:
image-id: ${{ steps.build-ui.outputs.image-id }}

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +23,8 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch

- name: Build and export
- id: build-ui
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/[email protected]
with:
dockerfile: ./docker/harbour/ui/Dockerfile
Expand All @@ -41,7 +44,8 @@ jobs:
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}
CAP_PIWIK_SITEID_TEST=${{ secrets.CAP_PIWIK_SITEID_TEST }}
- name: Build and export for end to end image
- id: build-ui-e2e
name: Build and export for end to end image
uses: cern-sis/gh-workflows/.github/actions/[email protected]
if: ${{ steps.get_branch.outputs.BRANCH_NAME }} == 'qa'
with:
Expand All @@ -59,3 +63,19 @@ jobs:
PIWIK_ENV=${{ steps.get_branch.outputs.BRANCH_NAME }}
CAP_PIWIK_URL=${{ secrets.CAP_PIWIK_URL }}
CAP_PIWIK_SITEID_QA=${{ secrets.CAP_PIWIK_SITEID_QA }}
deploy:
needs: build-image
name: update-image
runs-on: ubuntu-20.04

steps:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/[email protected]
with:
event-type: update
token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES_CAP }}
repo: cern-sis/kubernetes-cap
images: |
cern-sis/cap-ui@{{ needs.build-image.outputs.image-id }}

0 comments on commit 600accb

Please sign in to comment.