Skip to content

Commit

Permalink
Conditionally run docker steps only on master branch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
DanVanAtta committed Jul 10, 2024
1 parent 18dcec5 commit f04d355
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build database docker container
if: ${{ github.ref == 'refs/heads/master' }}
run: |
docker build database/sql --tag ghcr.io/triplea-game/lobby/flyway:latest
docker push ghcr.io/triplea-game/lobby/flyway:latest
- name: build server docker container
if: ${{ github.ref == 'refs/heads/master' }}
run: |
docker build . --tag ghcr.io/triplea-game/lobby/server:latest
docker push ghcr.io/triplea-game/lobby/server:latest
Expand Down

0 comments on commit f04d355

Please sign in to comment.