fix: minor updates to docker image (#80) #562
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: build | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build_images: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# The docker_target is a stage within the multistage pipeline | |
# The tag is what we push to dockerhub under the hamletio/hamlet image | |
- docker_target: hamlet | |
suffix: '' | |
- docker_target: jenkins-agent | |
suffix: -jenkins | |
- docker_target: azure-pipelines-agent | |
suffix: -azpipeline | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: docker meta details | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/${{github.repository}} | |
flavor: | | |
latest=auto | |
suffix=${{ matrix.suffix }},onlatest=true | |
tags: | | |
type=edge,branch=master | |
type=semver,pattern={{version}} | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ github.token }} | |
- name: Push Release | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name == 'scheduled' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
target: ${{ matrix.docker_target }} |