Skip to content

Commit

Permalink
CI updates
Browse files Browse the repository at this point in the history
This is done by the automated script named upgrade-c2cciutils-to-1.7
  • Loading branch information
sbrunner committed Jun 7, 2024
1 parent 9d825f8 commit f012a6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ jobs:
- run: pre-commit run --all-files
env:
SKIP: poetry-lock,pipenv-lock,helm-lock
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Apply pre-commit fix.patch
path: /tmp/pre-commit.patch
retention-days: 1
if: failure()
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
if: failure()
- name: Print the environment
run: c2cciutils-env
env:
Expand Down
45 changes: 4 additions & 41 deletions .github/workflows/pull-request-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ on:
types:
- opened
- reopened
- closed
pull_request_target:
types:
- closed

jobs:
auto-merge:
name: Auto reviews, merge and close pull requests
name: Auto reviews pull requests from bots
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand All @@ -38,11 +34,9 @@ jobs:
})
if: |-
startsWith(github.head_ref, 'ghci/audit/')
&& (github.event.pull_request.user.login == 'ghci-test[bot]'
|| github.event.pull_request.user.login == 'ghci-int[bot]'
|| github.event.pull_request.user.login == 'ghci[bot]')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
&& (github.event.pull_request.user.login == 'geo-ghci-test[bot]'
|| github.event.pull_request.user.login == 'geo-ghci-int[bot]'
|| github.event.pull_request.user.login == 'geo-ghci[bot]')
- name: Auto reviews Renovate updates
uses: actions/github-script@v7
with:
Expand All @@ -55,34 +49,3 @@ jobs:
})
if: |-
github.event.pull_request.user.login == 'renovate[bot]'
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
- name: Auto review and merge dpkg updates
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
});
github.graphql(`
mutation {
enablePullRequestAutoMerge(input: {
pullRequestId: "${context.payload.pull_request.node_id}",
mergeMethod: SQUASH,
}) {
pullRequest {
autoMergeRequest {
enabledAt
}
}
}
}
`)
if: |-
github.event.pull_request.user.login == 'c2c-bot-gis-ci-2'
&& startsWith(github.head_ref, 'dpkg-update/')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')

0 comments on commit f012a6a

Please sign in to comment.