-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #753 from conda-forge/add-automerge-task
feat: add dispatch integration for automerge
- Loading branch information
Showing
2 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: automerge | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
repo: | ||
description: 'the repository to run on' | ||
required: true | ||
type: string | ||
sha: | ||
description: 'the commit SHA to possibly merge' | ||
required: true | ||
type: string | ||
|
||
env: | ||
PY_COLORS: 1 | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
automerge: | ||
name: automerge | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.ref }} | ||
|
||
- name: setup conda | ||
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1 | ||
with: | ||
environment-file: conda-lock.yml | ||
environment-name: webservices | ||
condarc: | | ||
show_channel_urls: true | ||
channel_priority: strict | ||
channels: | ||
- conda-forge | ||
- name: generate token | ||
id: generate_token | ||
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1 | ||
with: | ||
app-id: ${{ secrets.CF_CURATOR_APP_ID }} | ||
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} | ||
|
||
- name: install code | ||
run: | | ||
pip install --no-deps --no-build-isolation -e . | ||
- name: automerge | ||
run: | | ||
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com" | ||
git config --global user.name "conda-forge-curator[bot]" | ||
git config --global pull.rebase false | ||
conda-forge-webservices-automerge \ | ||
--repo=${{ inputs.repo }} \ | ||
--sha=${{ inputs.sha }} | ||
env: | ||
GH_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
|
This file contains 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