-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Dockerfile and compose.yaml for containerization
- Loading branch information
1 parent
a069976
commit fd3a42c
Showing
2 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,26 @@ on: | |
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: DockerHub Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Read YAML file for version | ||
uses: pietrobolcato/[email protected] | ||
id: read_yaml | ||
with: | ||
config: ${{ github.workspace }}/version.yaml | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.read_yaml.outputs['version'] }} | ||
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.package-version.outputs.current-version}} | ||
|
||
- name: Docker Push | ||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.read_yaml.outputs['version'] }} | ||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/devops:${{ steps.package-version.outputs.current-version}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish Package - GHCR | ||
name: Publish Image - GHCR | ||
|
||
on: | ||
release: | ||
|
@@ -19,6 +19,10 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
|
@@ -32,18 +36,10 @@ jobs: | |
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Read YAML file for version | ||
uses: pietrobolcato/[email protected] | ||
id: read_yaml | ||
with: | ||
config: ${{ github.workspace }}/version.yaml | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
ghcr.io/pradumnasaraf/devops:latest | ||
ghcr.io/pradumnasaraf/devops:${{ steps.read_yaml.outputs['version'] }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
tags: ghcr.io/pradumnasaraf/devops:${{ steps.package-version.outputs.current-version}} | ||
labels: ${{ steps.meta.outputs.labels }} |