Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added container registry GHCR #12

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}