-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.65 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 0,12 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
tidy:
uses: taiki-e/workflows/.github/workflows/tidy.yml@main
# TODO: test on CI
bucket:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- run: tools/bucket.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: diff
run: tools/ci/bucket.sh
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
- uses: peter-evans/create-pull-request@v5
with:
title: Update bucket
body: |
Auto-generated by [create-pull-request][1]
[Please close and immediately reopen this pull request to run CI.][2]
[1]: https://github.com/peter-evans/create-pull-request
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
branch: update-bucket
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
- run: git add -N . && git diff --exit-code