-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: merge branch dev into stage (#21)
* fix: #15 (#19) Co-authored-by: adriantoral <[email protected]> * feat: dockerhub deployment workflow (#18) --------- Co-authored-by: adriantoral <[email protected]> Co-authored-by: adriantoral <[email protected]>
- Loading branch information
1 parent
273c3f7
commit 0194912
Showing
4 changed files
with
51 additions
and
34 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish Docker Image | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- stage | ||
types: | ||
- closed | ||
|
||
jobs: | ||
if_merged: | ||
if: github.event.pull_request.merged == true | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: my-docker-hub-namespace/my-docker-hub-repository | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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,10 +1,8 @@ | ||
version: '3' | ||
|
||
services: | ||
saasbot: | ||
build: . | ||
volumes: | ||
- .:/usr/src/app | ||
- /usr/src/app/node_modules | ||
command: node dist/index.js | ||
|
||
environment: | ||
NODE_ENV: development | ||
NODE_ENV: development |