Skip to content

Commit

Permalink
Merge pull request #292 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 7.0.4 -- Push image to GHCR.io
  • Loading branch information
Praveenraj-K authored Oct 10, 2024
2 parents 6f00867 + 6de27a7 commit e5791cc
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test and Publish

on:
push:
branches: [ 'main' ] #Trigger on Push event to 'main' branch
tags: [ '[0-9]+.[0-9]+.[0-9]+'] # Trigger for the version tags '1.0.1'

jobs:
tests:
Expand All @@ -26,20 +28,32 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# Step to log into the DockerHub
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
# Step to log into the GHCR
- name: Log in to GHCR.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Step to Extract the meta for the image
- name: Extract metadata (tags, labels) for Docker Images
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
images: |
${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit e5791cc

Please sign in to comment.