Skip to content

Commit

Permalink
Switch docker and test jobs to use workflow dispatch
Browse files Browse the repository at this point in the history
Needed to have automerge on same pipeline
  • Loading branch information
glensc committed Sep 16, 2024
1 parent 9635d01 commit 7518efd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
on:
pull_request:
workflow_call:
secrets:
github-token:
required: true

jobs:
# https://github.com/fastify/github-action-merge-dependabot
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 5 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test

on:
- pull_request
workflow_call:

env:
DEFAULT_PYTHON: 3.8
Expand Down

0 comments on commit 7518efd

Please sign in to comment.