diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 4bb39388adc..436e257cc7b 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,14 +1,14 @@ on: - pull_request: + workflow_call: + secrets: + github-token: + required: true jobs: # https://github.com/fastify/github-action-merge-dependabot automerge: name: Dependabot auto-merge runs-on: ubuntu-20.04 - needs: - - docker - - test permissions: pull-requests: write diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..9d381229e77 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +on: + push: + branches: + - main + tags: + - "*.*.*" + pull_request: + +jobs: + docker: + uses: ./.github/workflows/docker-image.yml + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} + + test: + uses: ./.github/workflows/test.yml + + automerge: + uses: ./.github/workflows/automerge.yml + needs: + - docker + - test + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} + +# vim:ft=yaml:et:ts=2:sw=2 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 09170b5e920..2a931d1d977 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,12 +6,10 @@ name: Publish Docker image on: - push: - branches: - - main - tags: - - "*.*.*" - pull_request: + workflow_call: + secrets: + github-token: + required: true env: REGISTRY: ghcr.io @@ -51,7 +49,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.github-token }} - name: Extract metadata (tags, labels) for Docker id: meta diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4a8c5f5ebb..a10f937fa6b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test on: - - pull_request + workflow_call: env: DEFAULT_PYTHON: 3.8