Skip to content

Commit bf7344c

Browse files
committed
Squashed 'buildres/csl/csl-locales/' changes from ecb8e70233..79c4dba80a
79c4dba80a copied .github/workflows/merge.yaml .github/workflows/sheldon.yaml from styles 444eafb731 copied .github/workflows/sheldon.yaml from styles 810aad5bbc Add Hindi locale file (#216) 81e7a4db3e copied .github/workflows/sheldon.yaml from styles 01e105d03f copied .github/workflows/sheldon.yaml from styles 5e7a243493 copied .github/workflows/sheldon.yaml from styles 0cc2f75795 copied .github/workflows/sheldon.yaml from styles 01ccfd6e97 Update locales.json 5627bdaadb Update locales.json af8f991570 Stop notifying 8827 port on Zotero servers (#215) 3ad32f0fb9 copied .github/workflows/merge.yaml from styles git-subtree-dir: buildres/csl/csl-locales git-subtree-split: 79c4dba80a16ad71a1ef462dcdba4db48e4f77ba
1 parent b22311f commit bf7344c

File tree

4 files changed

+392
-18
lines changed

4 files changed

+392
-18
lines changed

.github/workflows/merge.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
5959
uses: ruby/setup-ruby@v1
6060
with:
61-
ruby-version: 2.7.1
61+
ruby-version: 3.0.0
6262
- name: but use cache to speed that up
6363
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
6464
uses: actions/cache@v2
@@ -98,13 +98,10 @@ jobs:
9898
if: github.event_name == 'workflow_dispatch'
9999

100100
# https://styles-update.zotero.org:8826/ is for Zotero (styles page, API's citation server, client style updates, etc.)
101-
# https://styles-update.zotero.org:8827/ is for the Zotero-run instance of https://github.com/citation-style-language/distribution-updater
102-
# that performs the updating of the (to-be-deprecated) https://github.com/citation-style-language/styles-distribution/ repo
103101
- name: ping Zotero servers
104102
if: github.repository == 'citation-style-language/styles'
105103
run: |
106104
curl -H 'Content-Length:' -H "Authorization: $ZOTERO_UPDATE_TOKEN" -F 'payload={"type":"push","branch":"${{ steps.release.outputs.branch }}","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8826/
107-
curl -H 'Content-Length:' -H "Authorization: $ZOTERO_UPDATE_TOKEN" -F 'payload={"type":"push","branch":"${{ steps.release.outputs.branch }}","status":0,"commit":"'$GITHUB_SHA'"}' https://styles-update.zotero.org:8827/
108105
109106
- name: Copy workflows to locales repository
110107
if: github.repository == 'citation-style-language/styles' && steps.update.outputs.workflows == 'true'

.github/workflows/sheldon.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,34 @@ name: Pull request feedback
22

33
on:
44
pull_request_target:
5-
types: [ opened, synchronize ]
5+
types: [ opened, synchronize, labeled ]
66

77
jobs:
88
test:
99
runs-on: ubuntu-latest
1010
env:
1111
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
1212
steps:
13-
- uses: actions/checkout@v2
13+
# owner-test just checks out the PR -- this has an exfiltration risk, make SURE that
14+
# this can only be triggered by people with repo write access -- such as people that can add
15+
# labels to a PR
16+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
17+
- name: Checkout repo for OWNER TEST
18+
uses: actions/checkout@v2
19+
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
23+
# otherwise, checkout the current master, and the pr to the subdirectory 'pr'
24+
- name: Checkout base repo for pull-request test
25+
uses: actions/checkout@v2
26+
if: "! contains(github.event.pull_request.labels.*.name, 'safe to test')"
27+
- name: Checkout pull-request
28+
uses: actions/checkout@v2
29+
if: "! contains(github.event.pull_request.labels.*.name, 'safe to test')"
30+
with:
31+
path: pull-request
32+
ref: ${{ github.event.pull_request.head.sha }}
1433

1534
- name: Check for relevant changes
1635
uses: dorny/paths-filter@v2
@@ -29,36 +48,28 @@ jobs:
2948
echo changed: ${{ steps.changed.outputs.style_files }} ${{ steps.changed.outputs.locale_files }}
3049
3150
- name: Set up Ruby
32-
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
3351
uses: ruby/setup-ruby@v1
3452
with:
35-
ruby-version: 2.7.1
53+
ruby-version: 3.0.0
3654
- name: but use cache to speed that up
37-
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
3855
uses: actions/cache@v2
3956
with:
4057
path: vendor/bundle
4158
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
4259
restore-keys: |
4360
${{ runner.os }}-gems-
4461
- name: Bundle install
45-
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
4662
run: |
4763
bundle config path vendor/bundle
4864
bundle update sheldon --jobs 4 --retry 3
4965
50-
- name: Apply the PR
51-
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
52-
run: bundle exec sheldon --token=$GITHUB_TOKEN --apply
53-
5466
- name: Welcome to a new PR
5567
if: github.event.action == 'opened' && steps.changed.outputs.style == 'true'
5668
run: bundle exec sheldon --token=$GITHUB_TOKEN --welcome
5769

5870
- name: See if the styles/locales work
59-
if: steps.changed.outputs.style == 'true' || steps.changed.outputs.locale == 'true'
6071
run: bundle exec rake
6172

6273
- name: report
6374
if: (failure() || success()) && steps.changed.outputs.style == 'true'
64-
run: bundle exec sheldon --token=$GITHUB_TOKEN --report --verbose
75+
run: bundle exec sheldon --token=$GITHUB_TOKEN --${{ job.status }} --verbose

0 commit comments

Comments
 (0)