Skip to content

Instantly share code, notes, and snippets.

@sir-farfan
Created July 15, 2020 23:01
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 sir-farfan/fc62ff0ae6651a79d6ecd9e21496daae to your computer and use it in GitHub Desktop.
Save sir-farfan/fc62ff0ae6651a79d6ecd9e21496daae to your computer and use it in GitHub Desktop.
# put this in: .github/workflows/docker.yml
# an actual working example of the docker/build-push-action
# to push images to the registry automatically from github
on: [push, pull_request]
name: Docker
jobs:
docker:
name: Build and push to registry
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: account/tag
tag_with_sha: true
tag_with_ref: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment