Skip to content

Commit 8cef662

Browse files
committed
ci: don't publish dependabot check
1 parent de94605 commit 8cef662

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ on:
1515

1616
jobs:
1717

18+
check-publish:
19+
name: check publish
20+
runs-on: ubuntu-latest
21+
outputs:
22+
BUILD_VERSION: ${{ env.BUILD_VERSION }}
23+
BUILD_SNAPSHOT: ${{ env.BUILD_SNAPSHOT }}
24+
BUILD_PUBLISH: ${{ env.BUILD_PUBLISH }}
25+
26+
steps:
27+
- name: get version
28+
id: get-version
29+
uses: openapi-processor/openapi-processor-base/.github/actions/version@main
30+
with:
31+
version-file: 'gradle/libs.versions.toml'
32+
version-path: 'versions.processor'
33+
34+
- name: set version outputs
35+
shell: bash
36+
run: |
37+
echo BUILD_VERSION="${{steps.get-version.outputs.version}}" >> $GITHUB_ENV
38+
echo BUILD_SNAPSHOT="${{steps.get-version.outputs.snapshot}}" >> $GITHUB_ENV
39+
echo BUILD_PUBLISH="${{steps.get-version.outputs.publish}}" >> $GITHUB_ENV
40+
cat $GITHUB_ENV
41+
1842
test:
1943
name: test
2044

@@ -49,12 +73,11 @@ jobs:
4973
path: build/reports
5074

5175
publish:
52-
if: ${{ github.actor == 'hauner' }}
53-
54-
needs: [test]
76+
needs: [check-publish, test]
5577
name: publish snapshot
5678

5779
runs-on: ubuntu-latest
80+
if: needs.check-publish.outputs.BUILD_PUBLISH == 'true'
5881

5982
steps:
6083
- name: checkout

0 commit comments

Comments
 (0)