Skip to content

Commit

Permalink
ci: updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago committed Oct 4, 2023
1 parent fb3ebfb commit b2ac2fb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/spdx_license_bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
- cron: "4 8 * * 1-5"
workflow_dispatch:

env:
# The code Mason returns when there are changes detected after generation, see:
# https://github.com/felangel/mason/tree/master/packages/mason_cli#detecting-changes-after-generation
MASON_DETECTED_CHANGES_CODE: 70

jobs:
build:
defaults:
Expand All @@ -38,16 +33,16 @@ jobs:
- name: 馃П Mason Make
id: make
run: echo "MAKE_CODE=${mason make spdx_license --licenses "[]" -o test --on-conflict overwrite --set-exit-if-changed}" >> $GITHUB_ENV
run: if [[ $(mason make spdx_license -q --licenses "[]" -o test --on-conflict overwrite --set-exit-if-changed) =~ "0 files changed" ]]; then echo "did_change=false"; else echo "did_change=true"; fi >> $GITHUB_ENV

- name: 馃攽 Config Git User
if: $MAKE_CODE == $MASON_DETECTED_CHANGES_CODE
if: ${{ env.did_change == 'true' }}
run: |
git config user.name VGV Bot
git config user.email vgvbot@users.noreply.github.com
- name: 馃摑 Create Pull Request
if: $MAKE_CODE == $MASON_DETECTED_CHANGES_CODE
if: ${{ env.did_change == 'true' }}
uses: peter-evans/create-pull-request@v5.0.2
with:
base: main
Expand Down

0 comments on commit b2ac2fb

Please sign in to comment.