Skip to content

Commit

Permalink
Always run tests for redmined CLI and run the dockerfile build job on…
Browse files Browse the repository at this point in the history
…ly when dockerfile has changed
  • Loading branch information
hidakatsuya committed Jul 21, 2024
1 parent 5ea3f70 commit d4ef428
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
name: main
name: Test and Build

on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "redmined"
- "install.sh"
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

outputs:
# This is for determining weather an Docker image need to be built or not on the next job.
dockerfile-changed: ${{ contains(steps.changed-files.outputs.all_modified_files, 'Dockerfile') }}

steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- uses: ./.github/actions/test

- uses: tj-actions/changed-files@v44
id: changed-files

build-and-publish:
needs: test

Expand All @@ -30,6 +36,8 @@ jobs:
contents: read
packages: write

if: ${{ needs.test.outputs.dockerfile-changed == 'true' }}

strategy:
matrix:
include:
Expand Down

0 comments on commit d4ef428

Please sign in to comment.