Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amaurybsouza/47be2a713805319531445c30dd6c9421 to your computer and use it in GitHub Desktop.
Save amaurybsouza/47be2a713805319531445c30dd6c9421 to your computer and use it in GitHub Desktop.
github-actions-demo
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