Skip to content

Commit

Permalink
Merge pull request #2280 from camptocamp/c2cciutils-upgrade-5.2
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
sbrunner authored Jun 5, 2024
2 parents b6ff22a + bd59af7 commit d72a99b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 143 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/changelog.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/codeql.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ jobs:
- name: Publish
run: c2cciutils-publish
if: env.HAS_SECRETS == 'HAS_SECRETS'
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Update dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()
31 changes: 0 additions & 31 deletions .github/workflows/pr-checks.yaml

This file was deleted.

61 changes: 29 additions & 32 deletions .github/workflows/pull-request-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types:
- opened
- reopened
- closed
pull_request_target:
types:
- closed

jobs:
auto-merge:
Expand All @@ -13,50 +17,43 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/github-script@v6
- name: Print event
run: echo "${GITHUB}" | jq
env:
GITHUB: ${{ toJson(github) }}
- name: Print context
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',
})
name: Auto reviews Renovate updates
if: github.event.pull_request.user.login == 'renovate[bot]'
- name: Auto review and merge snyk auto fix
console.log(context);
- name: Auto reviews GHCI updates
uses: actions/github-script@v7
if: github.event.pull_request.user.login == 'c2c-bot-gis-ci' && startsWith(github.head_ref, 'snyk-fix/')
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
}
}
}
}
`)
- name: Auto close pre-commit.ci autoupdate
uses: actions/github-script@v7
if: github.event.pull_request.user.login == 'pre-commit-ci'
})
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')
- name: Auto reviews Renovate updates
uses: actions/github-script@v6
with:
script: |-
github.rest.pulls.update({
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
event: 'APPROVE',
})
if: |-
github.event.pull_request.user.login == 'renovate[bot]'
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')

0 comments on commit d72a99b

Please sign in to comment.