Skip to content

Commit

Permalink
trying out some conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
thetoolsmith committed Jan 2, 2025
1 parent eaf545b commit 07593aa
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ on:
workflows: ["Tests"]
types:
- completed
#push:
# branches:
# - main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
#if: github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.status == 'completed' && github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Checkout GitHub Action'
id: checkout
Expand All @@ -35,6 +34,11 @@ jobs:
docker tag ghcr.io/cfpb/regtech/sbl/regtech-mail-api:latest ghcr.io/cfpb/regtech/sbl/regtech-mail-api:${{env.TAG_VERSION}}
docker tag ghcr.io/cfpb/regtech/sbl/regtech-mail-api:latest ghcr.io/cfpb/regtech/sbl/regtech-mail-api:${{env.TAG_VERSION}}_${{github.run_attempt}}
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: 'Login to GitHub Container Registry'
id: login
uses: docker/login-action@v3
Expand Down

0 comments on commit 07593aa

Please sign in to comment.