Update Repository #568
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Repository | |
| on: | |
| # every Sunday at 00:36 UTC | |
| # https://crontab.guru/#36_2_*_*_0 | |
| schedule: | |
| - cron: 36 2 * * 0 | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.repository }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| update: | |
| name: Update repository files | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write # Required to commit synced template and workflow updates. | |
| pull-requests: write # Required to open the generated update pull request. | |
| issues: write # Required for generated update pull request metadata. | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Configure git user | |
| run: | | |
| git config --global user.name 'Conda Bot' | |
| git config --global user.email '18747875+conda-bot@users.noreply.github.com' | |
| - uses: conda/actions/combine-durations@7f6830b1428a9bd47f0b068892c77eae95207037 # v26.1.0 | |
| id: durations | |
| continue-on-error: true | |
| - uses: conda/actions/template-files@7f6830b1428a9bd47f0b068892c77eae95207037 # v26.1.0 | |
| id: templates | |
| continue-on-error: true | |
| - name: Commit changes | |
| # no-op if there are no updates | |
| continue-on-error: true | |
| run: | | |
| git add . | |
| git commit --message "🤖 updated file(s)" | |
| - name: Create fork | |
| # no-op if the repository is already forked | |
| run: | | |
| FORK="$(gh repo fork --clone=false --default-branch-only 2>&1 | awk '{print $1}' | sed 's|^https://github.com/||')" | |
| echo "FORK=${FORK}" >> "$GITHUB_ENV" | |
| env: | |
| GH_TOKEN: ${{ secrets.SYNC_TOKEN }} | |
| - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| push-to-fork: ${{ env.FORK }} | |
| token: ${{ secrets.SYNC_TOKEN }} | |
| branch: update | |
| delete-branch: true | |
| title: 🤖 Update infrastructure file(s) | |
| body: | | |
| [update.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/update.yml | |
| Your friendly repository updater. | |
| ${{ steps.durations.outputs.summary }} | |
| ${{ steps.templates.outputs.summary }} | |
| This PR was triggered by @${{ github.triggering_actor }} via ${{ github.event_name }}. | |
| ###### Auto-generated by the [`update.yml`][update.yml] workflow, see ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. |