Skip to content

Instantly share code, notes, and snippets.

@mfaridzia
Created December 3, 2019 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfaridzia/1ad2e451f8177f5049d3b8fa6c8721dd to your computer and use it in GitHub Desktop.
Save mfaridzia/1ad2e451f8177f5049d3b8fa6c8721dd to your computer and use it in GitHub Desktop.
name: demo github actions
on: push
jobs:
build-and-publish:
name: build & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: npm install
uses: actions/npm@master
with:
args: install
- name: docker build
uses: actions/docker/cli@master
with:
args: build -t muhfaridzia/demo-github-action-react-app .
- name: docker login
uses: actions/docker/login@master
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- name: docker push
uses: actions/docker/cli@master
with:
args: push muhfaridzia/demo-github-action-react-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment