Skip to content

Commit

Permalink
chore: add dependency between release and build-test job
Browse files Browse the repository at this point in the history
  • Loading branch information
muchasxmaracas committed Jan 9, 2025
1 parent d6823a7 commit 88d6890
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docker-image-publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ env:

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:

build-test:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,11 +29,13 @@ jobs:
run: docker build . --file test.Dockerfile --tag gallowhead:test-$(date +%s)

release:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
needs: [build-test]
permissions:
contents: write
pull-requests: write
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -44,6 +45,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-and-push-image:
if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
needs: [release]
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"branches": ["main"],
"branches": ["main", "test"],
"plugins": [
[
"@semantic-release/changelog",
Expand Down

0 comments on commit 88d6890

Please sign in to comment.