From ac7f34b3c0a2aadb672a96d04a9c269124d35250 Mon Sep 17 00:00:00 2001 From: Conda Bot <18747875+conda-bot@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:34:44 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20updated=20file(s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/template-files/config.yml | 50 ++++++++++++ .github/workflows/update.yml | 124 ++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 .github/template-files/config.yml create mode 100644 .github/workflows/update.yml diff --git a/.github/template-files/config.yml b/.github/template-files/config.yml new file mode 100644 index 0000000..1038168 --- /dev/null +++ b/.github/template-files/config.yml @@ -0,0 +1,50 @@ +conda/governance: + # [required] community files + - CODE_OF_CONDUCT.md + +conda/infrastructure: + # [required] general workflows + - .github/workflows/cla.yml + - .github/workflows/update.yml + + # [optional] to include repo in https://github.com/orgs/conda/projects/2 + - .github/workflows/issues.yml + - .github/workflows/labels.yml + - .github/workflows/project.yml + + # [optional] stale bot workflows + - .github/workflows/stale.yml + - .github/workflows/lock.yml + + # [optional] general processes for the conda org + - src: templates/HOW_WE_USE_GITHUB.md + dst: HOW_WE_USE_GITHUB.md + + # [optional] standard issue templates + - src: templates/issues/bug.yml + dst: .github/ISSUE_TEMPLATE/0_bug.yml + + - src: templates/issues/feature.yml + dst: .github/ISSUE_TEMPLATE/1_feature.yml + + - src: templates/issues/documentation.yml + dst: .github/ISSUE_TEMPLATE/2_documentation.yml + + - src: templates/issues/epic.yml + dst: .github/ISSUE_TEMPLATE/epic.yml + + # [optional] standard PR template + # - src: templates/pull_requests/news_tests_docs.md + # dst: .github/template-files/templates/pull_request_template_details.md + - src: templates/pull_requests/base.md + dst: .github/PULL_REQUEST_TEMPLATE.md + + # [optional] rever release files + # - src: templates/releases/RELEASE.md + # dst: RELEASE.md + # with: + # placeholder: YY.M + # - src: templates/releases/rever.xsh + # dst: rever.xsh + # - src: templates/releases/TEMPLATE + # dst: news/TEMPLATE diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..b11957a --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,124 @@ +name: Update Repository + +on: + # every Sunday at 00:36 UTC + # https://crontab.guru/#36_2_*_*_0 + schedule: + - cron: 36 2 * * 0 + + workflow_dispatch: + + issue_comment: + types: + - created + +jobs: + update: + if: >- + !github.event.repository.fork + && ( + github.event_name == 'schedule' + || github.event_name == 'workflow_dispatch' + || ( + github.event_name == 'issue_comment' + && github.event.issue.pull_request + && ( + github.event.comment.body == '@conda-bot render' + || github.event.comment.body == '@conda-bot recreate' + ) + ) + ) + runs-on: ubuntu-latest + steps: + - if: github.event_name == 'issue_comment' + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + with: + comment-id: ${{ github.event.comment.id }} + reactions: eyes + reactions-edit-mode: replace + token: ${{ secrets.SYNC_TOKEN }} + + - if: github.event.comment.body == '@conda-bot render' + name: Configure git origin + run: | + echo REPOSITORY=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.repo.full_name') >> $GITHUB_ENV + echo REF=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.ref') >> $GITHUB_ENV + + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + repository: ${{ env.REPOSITORY || github.repository }} + ref: ${{ env.REF || '' }} + token: ${{ secrets.SYNC_TOKEN }} + + - 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@15f883f14f4232f83658e3609c3316d58905138f # v24.8.0 + id: durations + continue-on-error: true + + - uses: conda/actions/template-files@15f883f14f4232f83658e3609c3316d58905138f # v24.8.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)" + + - if: github.event.comment.body != '@conda-bot render' + name: Create fork + # no-op if the repository is already forked + run: echo FORK=$(gh repo fork --clone=false --default-branch-only 2>&1 | awk '{print $1}') >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.SYNC_TOKEN }} + + - if: github.event.comment.body != '@conda-bot render' + id: create + # no-op if no commits were made + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 + 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 }}. + +
+ Commands + + Trigger actions by commenting on this PR: + + - `@conda-bot render` will run rendering workflows and commit and push any changes to this PR + - `@conda-bot recreate` will recreate this PR, overwriting any edits that have been made to it + +
+ + ###### Auto-generated by the [`update.yml`][update.yml] workflow, see ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. + + - if: github.event.comment.body == '@conda-bot render' + id: update + name: Push changes + run: git push --force-with-lease + + - if: always() && github.event_name == 'issue_comment' + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + with: + comment-id: ${{ github.event.comment.id }} + reactions: ${{ (steps.create.conclusion == 'success' || steps.update.conclusion == 'success') && 'hooray' || 'confused' }} + reactions-edit-mode: replace + token: ${{ secrets.SYNC_TOKEN }} From 5d67669337a6e8fb12d0d93bd23d27c7c0226a54 Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Mon, 19 Aug 2024 10:32:56 -0500 Subject: [PATCH 2/2] Remove unused news snippets --- ...295-create-output-dir-if-missing-and-force | 21 ------------------- news/306-fix-hard-link-failure | 20 ------------------ news/TEMPLATE | 19 ----------------- news/issue-345 | 3 --- news/support-pixi-environments.md | 19 ----------------- 5 files changed, 82 deletions(-) delete mode 100644 news/295-create-output-dir-if-missing-and-force delete mode 100644 news/306-fix-hard-link-failure delete mode 100644 news/TEMPLATE delete mode 100644 news/issue-345 delete mode 100644 news/support-pixi-environments.md diff --git a/news/295-create-output-dir-if-missing-and-force b/news/295-create-output-dir-if-missing-and-force deleted file mode 100644 index 95382df..0000000 --- a/news/295-create-output-dir-if-missing-and-force +++ /dev/null @@ -1,21 +0,0 @@ -### Enhancements - -* Creates the output directory if it does not already exist and `force` is used (#295) - -* Raise error before packing if the output directory is missing and `force` is not used (#295) - -### Bug fixes - -* - -### Deprecations - -* - -### Docs - -* - -### Other - -* diff --git a/news/306-fix-hard-link-failure b/news/306-fix-hard-link-failure deleted file mode 100644 index 7a121fb..0000000 --- a/news/306-fix-hard-link-failure +++ /dev/null @@ -1,20 +0,0 @@ -### Enhancements - -* - -### Bug fixes - -* In `SquashFSArchive._add` use copy instead of hard-link when source and -destination do not share file ownership (#248). - -### Deprecations - -* - -### Docs - -* - -### Other - -* diff --git a/news/TEMPLATE b/news/TEMPLATE deleted file mode 100644 index c09f3e9..0000000 --- a/news/TEMPLATE +++ /dev/null @@ -1,19 +0,0 @@ -### Enhancements - -* - -### Bug fixes - -* - -### Deprecations - -* - -### Docs - -* - -### Other - -* diff --git a/news/issue-345 b/news/issue-345 deleted file mode 100644 index 8db3568..0000000 --- a/news/issue-345 +++ /dev/null @@ -1,3 +0,0 @@ -### Enhancements - -* Archives using tar and gzip compression are now reproducible. (#349) diff --git a/news/support-pixi-environments.md b/news/support-pixi-environments.md deleted file mode 100644 index 55751d6..0000000 --- a/news/support-pixi-environments.md +++ /dev/null @@ -1,19 +0,0 @@ -### Enhancements - -* - -### Bug fixes - -* Fix a crash when trying to use conda-pack environments created with [pixi](https://pixi.sh). - -### Deprecations - -* - -### Docs - -* - -### Other - -*