Upgrading deps (#273) #25
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
| # On merge to main publish with the 'latest' label | |
| # Publish with release label when a releaes is published. | |
| name: Build and publish containers | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set prefix | |
| run: | | |
| echo "DOCKER_IMAGE_PREFIX=${REGISTRY}/${REPO,,}/" >>${GITHUB_ENV} | |
| env: | |
| REPO: '${{ github.repository }}' | |
| - name: Set image tag | |
| id: vars | |
| run: | | |
| if [[ "${{ github.event_name }}" == "release" ]]; then | |
| echo "DOCKER_IMAGE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
| else | |
| echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV | |
| fi | |
| - name: Build and push base images via compose | |
| run: | | |
| docker compose build --push | |
| - name: Build and push testenv images via compose | |
| run: | | |
| docker compose -f testenv-compose.yml build --push |