Skip to content

Commit

Permalink
Merge pull request #12 from mackerelio/ghcr
Browse files Browse the repository at this point in the history
added container registry GHCR
  • Loading branch information
yseto authored Mar 3, 2025
2 parents 2c8a8e6 + ec033dd commit fa93b84
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/wf-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
needs-push:
type: boolean
default: false
permissions:
contents: read
id-token: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,6 +42,14 @@ jobs:
env:
AWS_REGION: us-east-1

- name: Login to GHCR
if: inputs.needs-push
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get tag
id: get_tag
run: echo "tag=${GITHUB_REF##*/}" >> "$GITHUB_OUTPUT"
Expand All @@ -54,3 +66,5 @@ jobs:
mackerel/mackerel-agent:${{ steps.get_tag.outputs.tag }}
public.ecr.aws/mackerel/mackerel-agent:latest
public.ecr.aws/mackerel/mackerel-agent:${{ steps.get_tag.outputs.tag }}
ghcr.io/${{ github.repository_owner }}/mackerel-agent:latest
ghcr.io/${{ github.repository_owner }}/mackerel-agent:${{ steps.get_tag.outputs.tag }}

0 comments on commit fa93b84

Please sign in to comment.