Skip to content

Commit 10b4d63

Browse files
committed
Forgot to login
Adding ghcr login step and retrying release.
1 parent 0325bfd commit 10b4d63

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.github/workflows/toolshed.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
name: Set up Docker Buildx
4444
uses: docker/setup-buildx-action@v3
4545

46+
- name: Login to GHCR
47+
uses: docker/login-action@v2
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
4653
- name: Build and push by digest
4754
id: build
4855
uses: docker/build-push-action@v5

.github/workflows/toxic.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
release-tx:
16-
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'release' && startsWith( github.ref, 'refs/tags/tx') && github.event.release.prerelease ) }}
16+
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'release' && startsWith( github.ref, 'refs/tags/tx') ) }}
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
@@ -43,24 +43,31 @@ jobs:
4343
name: Set up Docker Buildx
4444
uses: docker/setup-buildx-action@v3
4545

46+
- name: Login to GHCR
47+
uses: docker/login-action@v2
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
4653
- name: Build and push by digest
4754
id: build
4855
uses: docker/build-push-action@v5
4956
with:
5057
context: toxic
5158
platforms: ${{ matrix.platform }}
5259
labels: ${{ steps.meta.outputs.labels }}
53-
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name == 'pull_request' && 'false' || 'true' }}
54-
-
55-
name: Export digest
56-
if: ${{ github.event_name != 'pull_request'}}
60+
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ (github.event_name != 'pull_request' && !github.event.release.prerelease) && 'true' || 'false' }}
61+
62+
- name: Export digest
63+
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease}}
5764
run: |
5865
mkdir -p /tmp/digests
5966
digest="${{ steps.build.outputs.digest }}"
6067
touch "/tmp/digests/${digest#sha256:}"
61-
-
62-
name: Upload digest
63-
if: ${{ github.event_name != 'pull_request'}}
68+
69+
- name: Upload digest
70+
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease }}
6471
uses: actions/upload-artifact@v4
6572
with:
6673
name: digests-${{ env.PLATFORM_PAIR }}
@@ -74,19 +81,17 @@ jobs:
7481
needs:
7582
- release-tx
7683
steps:
77-
-
78-
name: Download digests
84+
- name: Download digests
7985
uses: actions/download-artifact@v4
8086
with:
8187
path: /tmp/digests
8288
pattern: digests-*
8389
merge-multiple: true
84-
-
85-
name: Set up Docker Buildx
90+
91+
- name: Set up Docker Buildx
8692
uses: docker/setup-buildx-action@v3
8793

88-
-
89-
name: Docker meta
94+
- name: Docker meta
9095
id: meta
9196
uses: docker/metadata-action@v5
9297
with:
@@ -100,13 +105,12 @@ jobs:
100105
username: ${{ github.repository_owner }}
101106
password: ${{ secrets.GITHUB_TOKEN }}
102107

103-
-
104-
name: Create manifest list and push
108+
- name: Create manifest list and push
105109
working-directory: /tmp/digests
106110
run: |
107111
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
108112
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
109-
-
110-
name: Inspect image
113+
114+
- name: Inspect image
111115
run: |
112116
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

0 commit comments

Comments
 (0)