From 6ee86e1a05fa241954af598f678f1f47600a62c4 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Fri, 3 Oct 2025 15:59:23 +0200 Subject: [PATCH] fix: Login to docker.io as well and use existing repo on GitHub --- .github/workflows/docker-image.yaml | 15 ++++++++++----- module-deploy/deploy.gradle.kts | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 3cf76b8..7366c49 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -58,31 +58,36 @@ jobs: echo "arch${n}=$d" >> $GITHUB_OUTPUT n=$((n+1)) done - - name: Perform docker login + - name: Perform login for ghcr.io uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} 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 id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/2martens/timetable + images: ghcr.io/2martens/tsw-timetable - uses: anchore/sbom-action@v0 with: - image: ghcr.io/2martens/timetable + image: ghcr.io/2martens/tsw-timetable@${{ steps.digest.outputs.digest }} output-file: sbom.json - name: Attest uses: actions/attest-build-provenance@v3 with: - subject-name: ghcr.io/2martens/timetable + subject-name: ghcr.io/2martens/tsw-timetable subject-digest: ${{ steps.digest.outputs.digest }} push-to-registry: true - name: Generate SBOM attestation uses: actions/attest-sbom@v2 with: - subject-name: ghcr.io/2martens/timetable + subject-name: ghcr.io/2martens/tsw-timetable subject-digest: ${{ steps.digest.outputs.digest }} sbom-path: 'sbom.json' push-to-registry: true \ No newline at end of file diff --git a/module-deploy/deploy.gradle.kts b/module-deploy/deploy.gradle.kts index c78c57e..6e8f4a7 100644 --- a/module-deploy/deploy.gradle.kts +++ b/module-deploy/deploy.gradle.kts @@ -21,7 +21,7 @@ jib { } } to { - image = "ghcr.io/2martens/timetable" + image = "ghcr.io/2martens/tsw-timetable" tags = setOf( "latest", properties["version"].toString().replace("+", "-"))