Skip to content

Commit 1dec34d

Browse files
committed
asset creation fix
1 parent c477f74 commit 1dec34d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
22
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif
3+
# https://github.community/t/how-to-get-just-the-tag-name/16241/10
4+
35
name: CI
46

57
on:
@@ -20,6 +22,13 @@ jobs:
2022
with:
2123
access_token: ${{ github.token }}
2224

25+
- name: source info
26+
id: source_info
27+
run: |
28+
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
29+
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
30+
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
31+
2332
- uses: actions/checkout@v2
2433

2534
- name: application build
@@ -48,8 +57,8 @@ jobs:
4857
with:
4958
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
5059
upload_url: ${{ steps.create_release.outputs.upload_url }}
51-
asset_path: ./releases/kubernetes-pfsense-controller-${{ github.ref }}.phar
52-
asset_name: kubernetes-pfsense-controller-${{ github.ref }}.phar
60+
asset_path: ./releases/kubernetes-pfsense-controller-${{ steps.source_info.outputs.SOURCE_TAG }}.phar
61+
asset_name: kubernetes-pfsense-controller-${{ steps.source_info.outputs.SOURCE_TAG }}.phar
5362
asset_content_type: application/zip
5463

5564
- name: docker build

0 commit comments

Comments
 (0)