Skip to content

Commit

Permalink
Allow decisions override (#15)
Browse files Browse the repository at this point in the history
Fix if referencing secret and allow overriding decisions location.
  • Loading branch information
xjunior authored Oct 8, 2024
1 parent a54f5c1 commit c93c9df
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ruby-gem.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
workflow_call:
secrets:
rubygems_api_key:
secrets.rubygems_api_key:
required: false
inputs:
before_build:
Expand Down Expand Up @@ -29,6 +29,10 @@ on:
default: "[]"
required: false
type: string
license-decisions:
required: false
type: string
default: doc/dependency_decisions.yml

jobs:
build:
Expand Down Expand Up @@ -57,11 +61,26 @@ jobs:
uses: ./.github/workflows/license-compliance.yml
with:
workdir: "${{ inputs.workdir }}"
decisions: "${{ inputs.license-decisions }}"

all:
if: ${{ always() }}
runs-on: ubuntu-latest
name: All
needs: [build, license-compliance]
steps:
- run: |
result="${{ needs.build.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
release:
needs: [build, license-compliance]
runs-on: ubuntu-latest
if: ${{ secrets.rubygems_api_key != '' && contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, inputs.package) }}
steps:
- uses: actions/checkout@v3
- uses: cadwallion/publish-rubygems-action@master
Expand Down

0 comments on commit c93c9df

Please sign in to comment.