Skip to content

Commit 025816f

Browse files
Updating toolshed to use get-tag
Having trouble with actions getting the right string from a release event. Hopefully this fixes it.
1 parent e5e4d97 commit 025816f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/toolshed.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,25 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v3
2323

24+
- name: process event
25+
id: process_event
26+
uses: olegtarasov/[email protected]
27+
with:
28+
tagRegex: "(${{ env.IMAGE_VERSION_PREFIX }}).*"
29+
- name: echo environment
30+
run: |
31+
echo "::group::environment"
32+
echo "ORG_NAMESPACE=${{ env.ORG_NAMESPACE }}"
33+
echo "IMAGE_NAME=${{ env.IMAGE_NAME }}"
34+
echo "IMAGE_VERSION_PREFIX=${{ env.IMAGE_VERSION_PREFIX }}"
35+
echo "GIT_TAG_NAME=${{ steps.process_event.outputs.tag }}"
36+
echo "::debug event=${{ toJSON( github.event ) }}"
37+
echo "::endgroup::"
2438
- name: dryrun-build
2539
if: ${{ github.event_name == 'pull_request' }}
2640
run: docker build ./${{ env.IMAGE_NAME }}
2741
- name: build-and-push
28-
if: ${{ github.event_name == 'release' && startsWith(github.ref, env.IMAGE_VERSION_PREFIX) }}
42+
if: ${{ github.event_name == 'release' && startsWith( steps.process_event.outputs.tag env.IMAGE_VERSION_PREFIX ) }}
2943
uses: macbre/push-to-ghcr@master
3044
with:
3145
context: ./${{ env.IMAGE_NAME }}

0 commit comments

Comments
 (0)