Skip to content

Commit

Permalink
chore|fix: correct meta-data for matchmaking agent before push.
Browse files Browse the repository at this point in the history
  • Loading branch information
drcgjung committed May 8, 2024
1 parent 204e9d1 commit 0ee7e64
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@ jobs:
password: ${{ secrets.DOCKER_HUB_TOKEN || secrets.GITHUB_TOKEN }}
repository: ${{ steps.set-docker-repo.outputs.REPO }}/provisioning-agent

# Create SemVer or ref tags dependent of trigger event
- name: Docker Meta Matchmaking
id: meta-match
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: |
${{ steps.set-docker-repo.outputs.REPO }}/provisioning-agent
# Automatically prepare image tags; See action docs for more examples.
# semver patter will generate tags like these for example :1 :1.2 :1.2.3
tags: |
type=sha,event=branch
type=sha,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=1.12.19-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# build in any case, but push only main and version tag settings
- name: Matchmaking Container Build and Push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
Expand All @@ -252,8 +270,8 @@ jobs:
file: matchmaking/src/main/docker/Dockerfile
# Build image for verification purposes on every trigger event. Only push if event is not a PR
push: ${{ ( github.event.inputs.deploy_docker == 'true' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) }}
tags: ${{ steps.meta-remote.outputs.tags }}
labels: ${{ steps.meta-remote.outputs.labels }}
tags: ${{ steps.meta-match.outputs.tags }}
labels: ${{ steps.meta-match.outputs.labels }}

# Important step to push image description to DockerHub - since this is version independent, we always take it from main
- name: Update Docker Hub description for Matchmaking Agent
Expand All @@ -265,21 +283,3 @@ jobs:
password: ${{ secrets.DOCKER_HUB_TOKEN || secrets.GITHUB_TOKEN }}
repository: ${{ steps.set-docker-repo.outputs.REPO }}/matchmaking-agent

# Create SemVer or ref tags dependent of trigger event
- name: Docker Meta Matchmaking
id: meta-match
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: |
${{ steps.set-docker-repo.outputs.REPO }}/provisioning-agent
# Automatically prepare image tags; See action docs for more examples.
# semver patter will generate tags like these for example :1 :1.2 :1.2.3
tags: |
type=sha,event=branch
type=sha,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=1.12.19-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

0 comments on commit 0ee7e64

Please sign in to comment.