Skip to content
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
8 changes: 6 additions & 2 deletions .github/workflows/agenthits-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ jobs:
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# The image package belongs to the agentHits account, and a
# personal-account package cannot give Actions access to a
# repository of an organization, so GHCR refuses the job token here
# and the push needs a token of the package owner.
username: ${{ secrets.GHCR_PUSH_TOKEN && 'agentHits' || github.actor }}
password: ${{ secrets.GHCR_PUSH_TOKEN || secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v7
Expand Down