Skip to content

Commit cd75d5d

Browse files
authored
ping distribution-updater (#5132)
1 parent dcf473a commit cd75d5d

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.github/workflows/merge.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
env:
1717
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18+
DISTRIBUTION_UPDATER_TOKEN: "${{ secrets.DISTRIBUTION_UPDATER_TOKEN }}"
1819
steps:
1920
- uses: actions/checkout@v2
2021
if: github.event_name == 'push'
@@ -89,3 +90,9 @@ jobs:
8990
repository: 'release'
9091
commit_message: ${{ github.event.inputs.commit_message }}
9192
if: github.event_name == 'workflow_dispatch'
93+
94+
- name: ping distribution-updater
95+
if: github.repository == 'citation-style-language/styles'
96+
run: |
97+
curl -H "Authorization: $DISTRIBUTION_UPDATER_TOKEN" -F 'payload={"type":"pull_request","branch":"master","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8826/
98+
curl -H "Authorization: $DISTRIBUTION_UPDATER_TOKEN" -F 'payload={"type":"pull_request","branch":"master","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8827/

.github/workflows/sheldon.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,50 @@ jobs:
1414

1515
- name: Check for relevant changes
1616
uses: dorny/paths-filter@v2
17-
id: sheldon
17+
id: changed
1818
with:
1919
list-files: shell
2020
filters: |
21-
changed:
21+
style:
2222
- '*.csl'
23+
locale:
24+
- '*.xml'
2325
2426
- name: Changed files
2527
run: |
26-
echo changed: ${{ steps.sheldon.outputs.changed_files }}
28+
echo changed: ${{ steps.changed.outputs.style_files }} ${{ steps.changed.outputs.locale_files }}
2729
2830
- name: Set up Ruby
29-
if: steps.sheldon.outputs.changed == 'true'
31+
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
3032
uses: ruby/setup-ruby@v1
3133
with:
3234
ruby-version: 2.7.1
3335
- name: but use cache to speed that up
34-
if: steps.sheldon.outputs.changed == 'true'
36+
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
3537
uses: actions/cache@v2
3638
with:
3739
path: vendor/bundle
3840
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
3941
restore-keys: |
4042
${{ runner.os }}-gems-
4143
- name: Bundle install
42-
if: steps.sheldon.outputs.changed == 'true'
44+
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
4345
run: |
4446
bundle config path vendor/bundle
4547
bundle update sheldon --jobs 4 --retry 3
4648
4749
- name: Apply the PR
48-
if: steps.sheldon.outputs.changed == 'true'
50+
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
4951
run: bundle exec sheldon --token=$GITHUB_TOKEN --apply
5052

5153
- name: Welcome to a new PR
52-
if: github.event.action == 'opened' && steps.sheldon.outputs.changed == 'true'
54+
if: github.event.action == 'opened' && steps.changed.outputs.style == 'true'
5355
run: bundle exec sheldon --token=$GITHUB_TOKEN --welcome
5456

55-
- name: See if the styles work
56-
if: steps.sheldon.outputs.changed == 'true'
57+
- name: See if the styles/locales work
58+
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
5759
run: bundle exec rake
5860

5961
- name: report
60-
if: (failure() || success()) && steps.sheldon.outputs.changed == 'true'
62+
if: (failure() || success()) && steps.changed.outputs.style == 'true'
6163
run: bundle exec sheldon --token=$GITHUB_TOKEN --report --verbose

0 commit comments

Comments
 (0)