Codebase list citation-style-language-locales / fbfaf5dd-7748-4155-a984-a52e67dd71cb/upstream
Import upstream version 0~20210928.495f888 Debian Janitor 2 years ago
5 changed file(s) with 213 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
0 ## CSL Locales Pull Request Template
1
2 You're about to create a pull request to the CSL locales repository.
3 If you haven't done so already, see <http://docs.citationstyles.org/en/stable/translating-locale-files.html> for instructions on how to translate CSL locale files, and <https://github.com/citation-style-language/styles/blob/master/CONTRIBUTING.md> on how to submit your changes.
4 In addition, please fill out the pull request template below.
5
6 ### Description
7
8 Briefly describe the changes you're proposing.
9
10 ### Checklist
11
12 - [ ] Check that you're listed as a `<translator>` in the `<info>` block at the beginning of the file.
0 name: Merge to release
1
2 on:
3 push:
4 branches:
5 - master
6 workflow_dispatch:
7 inputs:
8 commit_message:
9 description: Commit message
10 required: true
11
12 jobs:
13 release:
14 runs-on: ubuntu-latest
15 env:
16 GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17 DISTRIBUTION_UPDATER_TOKEN: "${{ secrets.DISTRIBUTION_UPDATER_TOKEN }}"
18 steps:
19 - uses: actions/checkout@v2
20 if: github.event_name == 'push'
21 - uses: actions/checkout@v2
22 if: github.event_name == 'workflow_dispatch'
23 with:
24 fetch-depth: 0
25
26 - name: Release branch version
27 id: release
28 run: echo ::set-output name=branch::v1.0.1
29 - name: Checkout release branch
30 uses: actions/checkout@v2
31 with:
32 ref: ${{ steps.release.outputs.branch }}
33 path: './release'
34
35 - name: Check for relevant changes
36 if: github.event_name == 'push'
37 uses: dorny/paths-filter@v2
38 id: update
39 with:
40 list-files: shell
41 filters: |
42 updated:
43 - added|modified: [ '*.csl', 'dependent/*.csl', '*.xml', 'README.md' ]
44 deleted:
45 - deleted: [ '*.csl', 'dependent/*.csl', '*.xml' ]
46 workflows:
47 - added|modified: .github/workflows/*.yaml
48
49 - name: Changed files
50 if: github.event_name == 'push'
51 run: |
52 echo updated: ${{ steps.update.outputs.updated_files }}
53 echo deleted: ${{ steps.update.outputs.deleted_files }}
54 echo workflows: ${{ steps.update.outputs.workflows_files }}
55
56 - name: Set up Ruby
57 if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
58 uses: ruby/setup-ruby@v1
59 with:
60 ruby-version: 3.0.0
61 - name: but use cache to speed that up
62 if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
63 uses: actions/cache@v2
64 with:
65 path: vendor/bundle
66 key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
67 restore-keys: |
68 ${{ runner.os }}-gems-
69 - name: Bundle install
70 if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true'))
71 run: |
72 bundle config path vendor/bundle
73 bundle update sheldon --jobs 4 --retry 3
74
75 - name: Populate new branch
76 run: bundle exec sheldon --token=$GITHUB_TOKEN --verbose --populate release
77 if: github.event_name == 'workflow_dispatch'
78
79 - name: update the timestamps and add the changes
80 run: bundle exec sheldon --token=$GITHUB_TOKEN --verbose --release release ${{ steps.update.outputs.updated_files }}
81 if: github.event_name == 'push' && steps.update.outputs.updated == 'true'
82
83 - name: delete deleted files
84 run: cd release && git rm ${{ steps.update.outputs.deleted_files }}
85 if: github.event_name == 'push' && steps.update.outputs.deleted == 'true'
86
87 - uses: stefanzweifel/git-auto-commit-action@v4
88 with:
89 repository: 'release'
90 commit_message: Releasing ${{ steps.update.outputs.updated_files }} ${{ steps.update.outputs.deleted_files }}
91 if: github.event_name == 'push' && (steps.update.outputs.updated == 'true' || steps.update.outputs.deleted == 'true')
92
93 - uses: stefanzweifel/git-auto-commit-action@v4
94 with:
95 repository: 'release'
96 commit_message: ${{ github.event.inputs.commit_message }}
97 if: github.event_name == 'workflow_dispatch'
98
99 # https://styles-update.zotero.org:8826/ is for Zotero (styles page, API's citation server, client style updates, etc.)
100 - name: ping Zotero servers
101 if: github.repository == 'citation-style-language/styles'
102 run: |
103 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/
104
105 - name: Copy workflows to locales repository
106 if: github.repository == 'citation-style-language/styles' && steps.update.outputs.workflows == 'true'
107 uses: drud/action-cross-commit@master
108 with:
109 source-folder: .github/workflows
110 destination-repository: https://csl-bot:${{ secrets.CSLBOT_TOKEN }}@github.com/citation-style-language/locales
111 destination-folder: .github/workflows
112 destination-branch: master
113 git-user: "csl-bot"
114 git-user-email: github@citationstyles.org
115 git-commit-message: copied ${{ steps.update.outputs.workflows_files }} from styles
0 name: Pull request feedback
1
2 on:
3 pull_request_target:
4 types: [ opened, synchronize, labeled ]
5
6 jobs:
7 test:
8 runs-on: ubuntu-latest
9 env:
10 GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
11 steps:
12 # owner-test just checks out the PR -- this has an exfiltration risk, make SURE that
13 # this can only be triggered by people with repo write access -- such as people that can add
14 # labels to a PR
15 # https://securitylab.github.com/research/github-actions-preventing-pwn-requests
16 - name: Checkout repo for OWNER TEST
17 uses: actions/checkout@v2
18 if: contains(github.event.pull_request.labels.*.name, 'safe to test')
19 with:
20 ref: ${{ github.event.pull_request.head.sha }}
21
22 # otherwise, checkout the current master, and the pr to the subdirectory 'pr'
23 - name: Checkout base repo for pull-request test
24 uses: actions/checkout@v2
25 if: "! contains(github.event.pull_request.labels.*.name, 'safe to test')"
26 - name: Checkout pull-request
27 uses: actions/checkout@v2
28 if: "! contains(github.event.pull_request.labels.*.name, 'safe to test')"
29 with:
30 path: pull-request
31 ref: ${{ github.event.pull_request.head.sha }}
32
33 - name: Check for relevant changes
34 uses: dorny/paths-filter@v2
35 id: changed
36 with:
37 list-files: shell
38 filters: |
39 style:
40 - '*.csl'
41 - 'dependent/*.csl'
42 locale:
43 - '*.xml'
44
45 - name: Changed files
46 run: |
47 echo changed: ${{ steps.changed.outputs.style_files }} ${{ steps.changed.outputs.locale_files }}
48
49 - name: Set up Ruby
50 uses: ruby/setup-ruby@v1
51 with:
52 ruby-version: 3.0.0
53 - name: but use cache to speed that up
54 uses: actions/cache@v2
55 with:
56 path: vendor/bundle
57 key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
58 restore-keys: |
59 ${{ runner.os }}-gems-
60 - name: Bundle install
61 run: |
62 bundle config path vendor/bundle
63 bundle update sheldon --jobs 4 --retry 3
64
65 - name: Welcome to a new PR
66 if: github.event.action == 'opened' && steps.changed.outputs.style == 'true'
67 run: bundle exec sheldon --token=$GITHUB_TOKEN --welcome
68
69 - name: See if the styles/locales work
70 run: bundle exec rake
71
72 - name: report
73 if: (failure() || success()) && steps.changed.outputs.style == 'true'
74 run: bundle exec sheldon --token=$GITHUB_TOKEN --${{ job.status }} --verbose
0 .bundle
1 *.swp
2 .ruby-version
3 .env
4 spec/sheldon/travis.json
1919 GEM
2020 remote: https://rubygems.org/
2121 specs:
22 addressable (2.7.0)
22 addressable (2.8.0)
2323 public_suffix (>= 2.0.2, < 5.0)
2424 citeproc (1.0.10)
2525 namae (~> 1.0)
4646 ruby-progressbar (~> 1.4)
4747 git_diff (0.4.3)
4848 hashdiff (0.3.7)
49 mini_portile2 (2.5.0)
49 mini_portile2 (2.6.1)
5050 multipart-post (2.1.1)
5151 namae (1.0.2)
52 nokogiri (1.11.1)
53 mini_portile2 (~> 2.5.0)
52 nokogiri (1.12.5)
53 mini_portile2 (~> 2.6.1)
5454 racc (~> 1.4)
5555 octokit (4.20.0)
5656 faraday (>= 0.9)