Skip to content

Commit 1c16801

Browse files
committed
ci: test check-version action
1 parent d7508ac commit 1c16801

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/actions/check-version/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,3 @@ runs:
3636
version=`cat ${{inputs.version-file}} | dasel -i toml '${{inputs.version-path}}'`
3737
echo "build-version=${version}" >> $GITHUB_OUTPUT
3838
cat $GITHUB_OUTPUT
39-
40-
- name: actor
41-
shell: bash
42-
run: echo ${{ github.actor }}

.github/workflows/build.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ jobs:
1818
version-test:
1919
name: testing version action
2020
runs-on: ubuntu-latest
21+
outputs:
22+
BUILD_VERSION: ${{ env.BUILD_VERSION }}
23+
2124
steps:
22-
- name: checkout
23-
uses: actions/checkout@v6
25+
# - name: checkout
26+
# uses: actions/checkout@v6
2427

2528
- name: get version
2629
id: get-version
@@ -31,10 +34,9 @@ jobs:
3134

3235
- name: echo version
3336
shell: bash
34-
run: echo BUILD_VERSION_X "$BUILD_VERSION_X"
35-
env:
36-
BUILD_VERSION_X: ${{ steps.get-version.outputs.build-version }}
37-
37+
run: |
38+
echo BUILD_VERSION="${{steps.get-version.outputs.build-version}}" >> $GITHUB_ENV
39+
cat $GITHUB_ENV
3840
3941
version:
4042
name: check version
@@ -100,7 +102,7 @@ jobs:
100102
path: '*/build/reports'
101103

102104
check-publish:
103-
needs: [version, test]
105+
needs: [version, test, version-test]
104106
name: check publish
105107

106108
runs-on: ubuntu-latest
@@ -109,7 +111,10 @@ jobs:
109111
github.actor == 'hauner' && contains(needs.version.outputs.BUILD_VERSION, 'SNAPSHOT')
110112
111113
steps:
112-
- run: echo "should publish ..."
114+
- run: |
115+
echo "should publish ..."
116+
echo version BUILD_VERSION ${{needs.version.outputs.BUILD_VERSION}}
117+
echo version-test BUILD_VERSION ${{needs.version-test.outputs.BUILD_VERSION}}
113118
114119
publish:
115120
needs: [check-publish]

0 commit comments

Comments
 (0)