ci: add github workflow for publishing container images #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Container Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+ | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish-images: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Log in to registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push images | |
| env: | |
| IMAGE_REPO_BASE: ghcr.io/${{ github.repository }} | |
| run: | | |
| GITREF=${{ github.ref }} | |
| case $GITREF in | |
| refs/heads/main) | |
| VERSION=unstable | |
| ;; | |
| *) | |
| ;; | |
| esac | |
| make plugin-images | |
| make plugin-images-push | |