fix: Login to docker.io as well and use existing repo on GitHub

This commit is contained in:
2025-10-03 15:59:23 +02:00
parent 223abe1b86
commit 6ee86e1a05
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -58,31 +58,36 @@ jobs:
echo "arch${n}=$d" >> $GITHUB_OUTPUT echo "arch${n}=$d" >> $GITHUB_OUTPUT
n=$((n+1)) n=$((n+1))
done done
- name: Perform docker login - name: Perform login for ghcr.io
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Perform login for docker.io
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ghcr.io/2martens/timetable images: ghcr.io/2martens/tsw-timetable
- uses: anchore/sbom-action@v0 - uses: anchore/sbom-action@v0
with: with:
image: ghcr.io/2martens/timetable image: ghcr.io/2martens/tsw-timetable@${{ steps.digest.outputs.digest }}
output-file: sbom.json output-file: sbom.json
- name: Attest - name: Attest
uses: actions/attest-build-provenance@v3 uses: actions/attest-build-provenance@v3
with: with:
subject-name: ghcr.io/2martens/timetable subject-name: ghcr.io/2martens/tsw-timetable
subject-digest: ${{ steps.digest.outputs.digest }} subject-digest: ${{ steps.digest.outputs.digest }}
push-to-registry: true push-to-registry: true
- name: Generate SBOM attestation - name: Generate SBOM attestation
uses: actions/attest-sbom@v2 uses: actions/attest-sbom@v2
with: with:
subject-name: ghcr.io/2martens/timetable subject-name: ghcr.io/2martens/tsw-timetable
subject-digest: ${{ steps.digest.outputs.digest }} subject-digest: ${{ steps.digest.outputs.digest }}
sbom-path: 'sbom.json' sbom-path: 'sbom.json'
push-to-registry: true push-to-registry: true
+1 -1
View File
@@ -21,7 +21,7 @@ jib {
} }
} }
to { to {
image = "ghcr.io/2martens/timetable" image = "ghcr.io/2martens/tsw-timetable"
tags = setOf( tags = setOf(
"latest", "latest",
properties["version"].toString().replace("+", "-")) properties["version"].toString().replace("+", "-"))