mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Use repository owner instead of actor to log into GitHub CR
This commit is contained in:
parent
066bb3e331
commit
caae3fa37b
1 changed files with 7 additions and 3 deletions
10
.github/workflows/docker-image.yaml
vendored
10
.github/workflows/docker-image.yaml
vendored
|
@ -23,6 +23,10 @@ jobs:
|
|||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Create lowercase repository name
|
||||
run: |
|
||||
GHCR_REPOSITORY="${{ github.repository_owner }}"
|
||||
echo "REPOSITORY=${GHCR_REPOSITORY,,}" >> ${GITHUB_ENV}
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -35,7 +39,7 @@ jobs:
|
|||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Taskwarrior Docker image
|
||||
|
@ -45,9 +49,9 @@ jobs:
|
|||
context: .
|
||||
file: "./docker/task.dockerfile"
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ github.actor }}/task:${{ github.ref_name }}
|
||||
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/task:${{ github.ref_name }}
|
||||
|
||||
- name: Sign the published Docker image
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
run: cosign sign ${{ env.REGISTRY }}/${{ github.actor }}/task@${{ steps.build-and-push.outputs.digest }}
|
||||
run: cosign sign ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/task@${{ steps.build-and-push.outputs.digest }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue