Skip to content

Commit c93c9df

Browse files
authored
Allow decisions override (#15)
Fix if referencing secret and allow overriding decisions location.
1 parent a54f5c1 commit c93c9df

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/ruby-gem.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
workflow_call:
33
secrets:
4-
rubygems_api_key:
4+
secrets.rubygems_api_key:
55
required: false
66
inputs:
77
before_build:
@@ -29,6 +29,10 @@ on:
2929
default: "[]"
3030
required: false
3131
type: string
32+
license-decisions:
33+
required: false
34+
type: string
35+
default: doc/dependency_decisions.yml
3236

3337
jobs:
3438
build:
@@ -57,11 +61,26 @@ jobs:
5761
uses: ./.github/workflows/license-compliance.yml
5862
with:
5963
workdir: "${{ inputs.workdir }}"
64+
decisions: "${{ inputs.license-decisions }}"
65+
66+
all:
67+
if: ${{ always() }}
68+
runs-on: ubuntu-latest
69+
name: All
70+
needs: [build, license-compliance]
71+
steps:
72+
- run: |
73+
result="${{ needs.build.result }}"
74+
if [[ $result == "success" || $result == "skipped" ]]; then
75+
exit 0
76+
else
77+
exit 1
78+
fi
6079
6180
release:
6281
needs: [build, license-compliance]
6382
runs-on: ubuntu-latest
64-
if: ${{ secrets.rubygems_api_key != '' && contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
83+
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
6584
steps:
6685
- uses: actions/checkout@v3
6786
- uses: cadwallion/publish-rubygems-action@master

0 commit comments

Comments
 (0)