Created
July 23, 2022 20:15
-
-
Save amaurybsouza/47be2a713805319531445c30dd6c9421 to your computer and use it in GitHub Desktop.
github-actions-demo
This file contains hidden or 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
name: Docker Image CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Dockerhub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag amaurybsouza/node-test:v2 | |
- name: Docker Push | |
run: docker push amaurybsouza/node-test:v2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment