|
1 | 1 | name: push issues data to goals
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - issues: |
5 |
| - types: ["opened", "edited", "deleted", "labeled", "unlabeled"] |
| 4 | + issues: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - edited |
| 8 | + - deleted |
| 9 | + - labeled |
| 10 | + - unlabeled |
6 | 11 | schedule:
|
7 | 12 | - cron: 42 1 * * 2,5
|
8 |
| - |
| 13 | + |
9 | 14 | jobs:
|
10 | 15 | sauce-grab:
|
11 | 16 | name: Open Sauced Issue Caching
|
| 17 | + if: github.repository_owner != 'open-sauced' |
12 | 18 | runs-on: ubuntu-latest
|
13 | 19 | steps:
|
14 |
| - - uses: actions/checkout@v2 |
15 |
| - - name: Build |
16 |
| - run: npm install |
17 |
| - - uses: open-sauced/actions/goals-caching@main |
18 |
| - if: github.repository_owner != 'open-sauced' |
19 |
| - env: |
20 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
21 |
| - LOGIN: ${{ github.repository_owner }} |
22 |
| - - name: Set up Git |
23 |
| - env: |
24 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
25 |
| - run: | |
26 |
| - git config user.name GitHub |
27 |
| - git config user.email noreply@github.com |
28 |
| - git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git |
29 |
| - - name: Commit and push changes |
30 |
| - run: | |
31 |
| - git add . |
32 |
| - if output=$(git status --porcelain) && [ ! -z "$output" ]; then |
33 |
| - git commit --author "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" --message "update the goals cache" |
34 |
| - git push |
35 |
| - fi |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + |
| 22 | + - uses: open-sauced/actions/goals-caching@main |
| 23 | + env: |
| 24 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + LOGIN: ${{ github.repository_owner }} |
| 26 | + |
| 27 | + - name: "🚀 Commit changes" |
| 28 | + uses: stefanzweifel/git-auto-commit-action@v4 |
| 29 | + with: |
| 30 | + file_pattern: ./*.json |
| 31 | + commit_message: "chore: update the goals cache" |
| 32 | + commit_user_name: open-sauced[bot] |
| 33 | + commit_user_email: 63161813+open-sauced[bot]@users.noreply.github.com |
| 34 | + |
0 commit comments