Skip to content

Commit

Permalink
Testing in the Develop branch with GitHub Actions workflow to push Do…
Browse files Browse the repository at this point in the history
…cker image to both DockerHUB and GHCR with latest tag on main branch
  • Loading branch information
Praveenraj-K committed Oct 4, 2024
1 parent 24e4a54 commit ac8446a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build and Publish
name: Build and Publish (Develop)

on:
push:
branches:
- main
- develop

jobs:
build-and-publish:
name: Build and Publish to DockerHub and GHCR
name: Build and Publish to DockerHub and GHCR (Develop)
runs-on: ubuntu-latest
steps:
# Checkout the code
Expand Down Expand Up @@ -39,9 +39,8 @@ jobs:
ghcr.io/${{ github.repository }} # For GHCR
tags: |
type=ref,event=branch
type=ref,event=tag
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
# set test tag for develop branch
type=raw,value=test,enable=${{ github.ref == 'refs/heads/develop' }}
# Build and push Docker image to Docker Hub
- name: Build and push Docker image to Docker Hub
Expand Down

0 comments on commit ac8446a

Please sign in to comment.