Merge pull request #47 from UWIT-IAM/GH-46 #22
This file contains 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: Re-build and upload a new image using given branch. | |
on: | |
push: | |
branches: | |
- mainline | |
- run-cache-new-image-workflow | |
workflow_dispatch: # Allows running from the Github Actions UI | |
jobs: | |
cache-new-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
env: | |
tag: ${{ github.ref == 'refs/heads/mainline' && 'latest' || 'dry-run-latest' }} | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/uwit-iam/idp-web-tests:${{ env.tag }} |