Skip to content

wf: add image updater workflow #11

wf: add image updater workflow

wf: add image updater workflow #11

name: Build and export CAP server image
on:
push:
branches: ['master', 'dev', 'qa', 'test']
paths-ignore:
- "ui/**"
jobs:
build-image:

Check failure on line 10 in .github/workflows/harbour-build-server.yml

View workflow run for this annotation

GitHub Actions / Build and export CAP server image

Invalid workflow file

The workflow is not valid. .github/workflows/harbour-build-server.yml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.
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
- name: Extract branch name
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: get_branch
- id: build
name: Build and export
uses: cern-sis/gh-workflows/.github/actions/docker-build@v6.1.0
with:
dockerfile: ./docker/harbour/backend/Dockerfile
platforms: linux/amd64,linux/arm64
image: cern-sis/cap-server
registry: registry.cern.ch
cache: false
tags: ${{ steps.get_branch.outputs.BRANCH_NAME }}
username: ${{ secrets.HARBOR_USERNAME }}
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/kubernetes-project-new-images@v6.4
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 }}