Skip to content

Commit

Permalink
Merge pull request #1730 from camptocamp/c2cciutils-upgrade-1.3
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
sbrunner authored Jun 6, 2024
2 parents 9d4d001 + 205d52e commit ff0623c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 119 deletions.
28 changes: 0 additions & 28 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 @@ -66,6 +66,14 @@ jobs:
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()
- name: Trigger changelog workflow
uses: actions/github-script@v7
with:
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/pr-checks.yaml

This file was deleted.

67 changes: 8 additions & 59 deletions .github/workflows/pull-request-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
script: |-
console.log(context);
- name: Auto reviews Renovate updates
- name: Auto reviews GHCI updates
uses: actions/github-script@v7
with:
script: |-
Expand All @@ -37,10 +37,13 @@ jobs:
event: 'APPROVE',
})
if: |-
github.event.pull_request.user.login == 'renovate[bot]'
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 review and merge snyk auto fix
- name: Auto reviews Renovate updates
uses: actions/github-script@v7
with:
script: |-
Expand All @@ -49,62 +52,8 @@ jobs:
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, 'snyk-fix/')
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')
- name: Restart audit workflow
uses: actions/github-script@v7
with:
script: |-
let runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'audit.yaml',
per_page: 1,
});
runs = runs.data.workflow_runs;
if (runs.length == 1 && runs[0].status != 'success') {
console.log(`Rerun workflow ${runs[0].id} ${runs[0].status}`);
github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runs[0].id,
});
}
if: |-
github.event.pull_request.user.login == 'c2c-bot-gis-ci-2'
&& (startsWith(github.head_ref, 'snyk-fix/')
|| startsWith(github.head_ref, 'dpkg-update/'))
&& github.event.action == 'closed'
&& github.event.pull_request.merged == true
- name: Auto close pre-commit.ci autoupdate
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
})
if: |-
github.event.pull_request.user.login == 'pre-commit-ci'
github.event.pull_request.user.login == 'renovate[bot]'
&& (github.event.action == 'opened'
|| github.event.action == 'reopened')

0 comments on commit ff0623c

Please sign in to comment.