| 1 |
name: Update Repository |
| 2 |
|
| 3 |
on: |
| 4 |
# every Sunday at 00:36 UTC |
| 5 |
# https://crontab.guru/#36_2_*_*_0 |
| 6 |
schedule: |
| 7 |
- cron: 36 2 * * 0 |
| 8 |
|
| 9 |
workflow_dispatch: |
| 10 |
|
| 11 |
permissions: |
| 12 |
contents: read |
| 13 |
|
| 14 |
jobs: |
| 15 |
update: |
| 16 |
runs-on: ubuntu-slim |
| 17 |
permissions: |
| 18 |
contents: write |
| 19 |
pull-requests: write |
| 20 |
issues: write |
| 21 |
steps: |
| 22 |
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| 23 |
with: |
| 24 |
repository: ${{ env.REPOSITORY || github.repository }} |
| 25 |
ref: ${{ env.REF || '' }} |
| 26 |
token: ${{ secrets.SYNC_TOKEN }} |
| 27 |
|
| 28 |
- name: Configure git user |
| 29 |
run: | |
| 30 |
git config --global user.name 'Conda Bot' |
| 31 |
git config --global user.email '[email protected]' |
| 32 |
|
| 33 |
- uses: conda/actions/combine-durations@7f6830b1428a9bd47f0b068892c77eae95207037 # v26.1.0 |
| 34 |
id: durations |
| 35 |
continue-on-error: true |
| 36 |
|
| 37 |
- uses: conda/actions/template-files@7f6830b1428a9bd47f0b068892c77eae95207037 # v26.1.0 |
| 38 |
id: templates |
| 39 |
continue-on-error: true |
| 40 |
|
| 41 |
- name: Commit changes |
| 42 |
# no-op if there are no updates |
| 43 |
continue-on-error: true |
| 44 |
run: | |
| 45 |
git add . |
| 46 |
git commit --message "🤖 updated file(s)" |
| 47 |
|
| 48 |
- name: Create fork |
| 49 |
# no-op if the repository is already forked |
| 50 |
run: echo FORK=$(gh repo fork --clone=false --default-branch-only 2>&1 | awk '{print $1}') >> $GITHUB_ENV |
| 51 |
env: |
| 52 |
GH_TOKEN: ${{ secrets.SYNC_TOKEN }} |
| 53 |
|
| 54 |
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 |
| 55 |
with: |
| 56 |
push-to-fork: ${{ env.FORK }} |
| 57 |
token: ${{ secrets.SYNC_TOKEN }} |
| 58 |
branch: update |
| 59 |
delete-branch: true |
| 60 |
title: 🤖 Update infrastructure file(s) |
| 61 |
body: | |
| 62 |
[update.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/update.yml |
| 63 |
|
| 64 |
Your friendly repository updater. |
| 65 |
|
| 66 |
${{ steps.durations.outputs.summary }} |
| 67 |
|
| 68 |
${{ steps.templates.outputs.summary }} |
| 69 |
|
| 70 |
This PR was triggered by @${{ github.triggering_actor }} via ${{ github.event_name }}. |
| 71 |
|
| 72 |
###### Auto-generated by the [`update.yml`][update.yml] workflow, see ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. |