Skip to content

Commit 0325bfd

Browse files
Thirtytwobits patch 1 (#42)
* Fixing toolshed.yml didn't get the logic right to trigger on tag. * Update toolshed.yml
1 parent 16c4723 commit 0325bfd

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

.github/workflows/toolshed.yml

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

1414
jobs:
1515
release-ts:
16-
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'release' && startsWith( github.ref, 'refs/tags/ts') && github.event.release.prerelease ) }}
16+
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'release' && startsWith( github.ref, 'refs/tags/ts') ) }}
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
@@ -50,17 +50,17 @@ jobs:
5050
context: toolshed
5151
platforms: ${{ matrix.platform }}
5252
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'}}
53+
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' }}
54+
55+
- name: Export digest
56+
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease}}
5757
run: |
5858
mkdir -p /tmp/digests
5959
digest="${{ steps.build.outputs.digest }}"
6060
touch "/tmp/digests/${digest#sha256:}"
61-
-
62-
name: Upload digest
63-
if: ${{ github.event_name != 'pull_request'}}
61+
62+
- name: Upload digest
63+
if: ${{ github.event_name != 'pull_request' && !github.event.release.prerelease }}
6464
uses: actions/upload-artifact@v4
6565
with:
6666
name: digests-${{ env.PLATFORM_PAIR }}
@@ -74,19 +74,17 @@ jobs:
7474
needs:
7575
- release-ts
7676
steps:
77-
-
78-
name: Download digests
77+
- name: Download digests
7978
uses: actions/download-artifact@v4
8079
with:
8180
path: /tmp/digests
8281
pattern: digests-*
8382
merge-multiple: true
84-
-
85-
name: Set up Docker Buildx
83+
84+
- name: Set up Docker Buildx
8685
uses: docker/setup-buildx-action@v3
8786

88-
-
89-
name: Docker meta
87+
- name: Docker meta
9088
id: meta
9189
uses: docker/metadata-action@v5
9290
with:
@@ -100,13 +98,12 @@ jobs:
10098
username: ${{ github.repository_owner }}
10199
password: ${{ secrets.GITHUB_TOKEN }}
102100

103-
-
104-
name: Create manifest list and push
101+
- name: Create manifest list and push
105102
working-directory: /tmp/digests
106103
run: |
107104
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
108105
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
109-
-
110-
name: Inspect image
106+
107+
- name: Inspect image
111108
run: |
112109
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

0 commit comments

Comments
 (0)