From 261abcf42be9dc5cc62ef7a62e735528b1ff1497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 30 Nov 2023 12:04:04 +0100 Subject: [PATCH] CI updates This is done by the automated script named upgrade-c2cciutils-to-1.7 --- .github/workflows/changelog.yaml | 40 ------------------- .github/workflows/dependency-auto-review.yaml | 2 +- .github/workflows/main.yaml | 22 ++++++++-- .github/workflows/pr-checks.yaml | 1 + ci/config.yaml | 2 +- 5 files changed, 22 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/changelog.yaml diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml deleted file mode 100644 index a623fb49c..000000000 --- a/.github/workflows/changelog.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Changelog Generator - -on: - schedule: - - cron: 0 0 * * 1,4 - repository_dispatch: - types: - - changelog - -jobs: - changelog: - name: Changelog Generator - runs-on: ubuntu-22.04 - timeout-minutes: 30 - - steps: - - name: Get Date - id: get-date - run: echo "date=$(/bin/date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 - with: - path: .cache - key: automation-${{ steps.get-date.outputs.date }} - restore-keys: |+ - automation- - - - run: docker pull aeonphp/automation - - name: Generate changelog - run: >- - docker run --env=AEON_AUTOMATION_GH_TOKEN --rm --volume=$(pwd)/.cache:/cache aeonphp/automation - changelog:generate:all - ${{ github.repository }} - --github-release-update - --cache-path=/cache - --skip-from=dependabot-preview[bot] - --skip-from=dependabot[bot] - --skip-from=renovate[bot] - -v - env: - AEON_AUTOMATION_GH_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} diff --git a/.github/workflows/dependency-auto-review.yaml b/.github/workflows/dependency-auto-review.yaml index d09719021..8a0eb528e 100644 --- a/.github/workflows/dependency-auto-review.yaml +++ b/.github/workflows/dependency-auto-review.yaml @@ -11,6 +11,7 @@ jobs: name: Auto reviews updates runs-on: ubuntu-22.04 timeout-minutes: 5 + if: github.event.pull_request.user.login == 'renovate[bot]' steps: - uses: actions/github-script@v6 @@ -22,4 +23,3 @@ jobs: pull_number: context.payload.pull_request.number, event: 'APPROVE', }) - if: github.event.pull_request.user.login == 'renovate[bot]' diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6b675f7fb..c79f30b14 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,13 +11,17 @@ on: - example-project/** pull_request: +permissions: + actions: write + contents: write + env: HAS_SECRETS: ${{ secrets.HAS_SECRETS }} jobs: main: - runs-on: ubuntu-22.04 name: Continuous integration + runs-on: ubuntu-22.04 timeout-minutes: 15 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" @@ -68,9 +72,21 @@ jobs: if: | env.HAS_SECRETS == 'HAS_SECRETS' + - name: Trigger changelog workflow + uses: actions/github-script@v7 + with: + script: |- + if (process.env.GITHUB_REF_TYPE == 'tag') { + console.log('Trigger changelog'); + await github.rest.repos.createDispatchEvent({ + owner: 'camptocamp', + repo: 'helm-mutualize', + event_type: 'changelog', + }); + } k8s: - runs-on: ubuntu-22.04 name: Kubernetes + runs-on: ubuntu-22.04 timeout-minutes: 20 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" @@ -108,8 +124,8 @@ jobs: if: always() audit: - runs-on: ubuntu-22.04 name: Audit + runs-on: ubuntu-22.04 timeout-minutes: 10 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 5354b56e5..099c91594 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -18,6 +18,7 @@ jobs: name: Pull request check runs-on: ubuntu-22.04 timeout-minutes: 5 + if: github.event.pull_request.user.login != 'renovate[bot]' steps: - run: pip install --upgrade attrs diff --git a/ci/config.yaml b/ci/config.yaml index 09c8145d6..5baa1f3c5 100644 --- a/ci/config.yaml +++ b/ci/config.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.6.11/c2cciutils/schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.6.0/c2cciutils/schema.json checks: codespell: