diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml deleted file mode 100644 index cfd5cc44..00000000 --- a/.github/workflows/changelog.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: Changelog Generator - -on: - schedule: - - cron: 0 0 * * 1,4 - push: - tags: - - '*.*.*' - -jobs: - changelog: - name: Changelog Generator - runs-on: ubuntu-22.04 - timeout-minutes: 30 - - steps: - - uses: actions/checkout@v4 - if: github.event_name == 'push' && github.ref_type == 'tag' - - name: Create release - run: |- - if [[ ${{ github.ref_name }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - gh release create ${{ github.ref_name }} --generate-notes || true - fi - if: github.event_name == 'push' && github.ref_type == 'tag' - env: - GH_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} - - - 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 deleted file mode 100644 index 8a0eb528..00000000 --- a/.github/workflows/dependency-auto-review.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Auto reviews updates - -on: - pull_request: - types: - - opened - - reopened - -jobs: - auto-merge: - 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 - with: - script: |- - github.rest.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - event: 'APPROVE', - }) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 54375a95..94ea43b9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,8 +5,8 @@ on: jobs: main: - runs-on: ubuntu-22.04 name: Continuous integration + runs-on: ubuntu-22.04 timeout-minutes: 20 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" @@ -36,3 +36,11 @@ jobs: - name: Publish run: c2cciutils-publish if: github.repository == 'camptocamp/docker-mapserver' + - 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() diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml deleted file mode 100644 index 2d780d8e..00000000 --- a/.github/workflows/pr-checks.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Pull request check - -on: - pull_request: - types: - - opened - - reopened - - labeled - - unlabeled - - edit - - synchronize - -env: - POETRY_DYNAMIC_VERSIONING_BYPASS: 0.0.0 - -jobs: - build: - 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 - - uses: actions/checkout@v4 - - - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - - run: python3 -m pip install --user --pre c2cciutils[pr_checks] - - - name: Check pull request - run: c2cciutils-pull-request-checks - env: - GITHUB_EVENT: ${{ toJson(github) }} - GITHUB_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} diff --git a/.github/workflows/pull-request-automation.yaml b/.github/workflows/pull-request-automation.yaml new file mode 100644 index 00000000..0fab6027 --- /dev/null +++ b/.github/workflows/pull-request-automation.yaml @@ -0,0 +1,59 @@ +name: Auto reviews, merge and close pull requests + +on: + pull_request: + types: + - opened + - reopened + - closed + pull_request_target: + types: + - closed + +jobs: + auto-merge: + name: Auto reviews, merge and close pull requests + runs-on: ubuntu-22.04 + timeout-minutes: 5 + + steps: + - name: Print event + run: echo "${GITHUB}" | jq + env: + GITHUB: ${{ toJson(github) }} + - name: Print context + uses: actions/github-script@v7 + with: + script: |- + console.log(context); + - name: Auto reviews GHCI 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', + }) + 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@v7 + with: + script: |- + github.rest.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + event: 'APPROVE', + }) + if: |- + github.event.pull_request.user.login == 'renovate[bot]' + && (github.event.action == 'opened' + || github.event.action == 'reopened')