Skip to content

Commit

Permalink
Merge pull request #162 from nicolasbock/workflow
Browse files Browse the repository at this point in the history
Resuable workflow
  • Loading branch information
nicolasbock committed Jul 10, 2024
2 parents 4d73d4e + 1d4f104 commit 706d62c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to Docker Hub

on:
workflow_run:
workflows: [Build and Test]
workflows: [Test and Build]
types:
- completed

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ghcr-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to ghcr.io

on:
workflow_run:
workflows: [Build and Test]
workflows: [Test and Build]
types:
- completed

Expand All @@ -11,6 +11,9 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
test-and-build:
uses: ./.github/workflows/test-and-build.yaml

ghcr-publish:
runs-on: ubuntu-latest
permissions:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Test and Build

on:
schedule:
Expand All @@ -13,9 +13,10 @@ on:
branches:
- main
workflow_dispatch:
workflow_call:

jobs:
test:
test-and-build:
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 706d62c

Please sign in to comment.