Skip to content

Instantly share code, notes, and snippets.

@ethomson
Created December 10, 2019 04:36
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 ethomson/60e664ef09051cea66dada5d53c62e6d to your computer and use it in GitHub Desktop.
Save ethomson/60e664ef09051cea66dada5d53c62e6d to your computer and use it in GitHub Desktop.
name: Docker
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: package docker
run: |
VERSION=$(date +%s)
docker login docker.pkg.github.com --username ethomson --password ${{ secrets.GITHUB_TOKEN }}
docker build . --file Dockerfile --tag docker.pkg.github.com/ethomson/myrepo/app:${VERSION}
docker push docker.pkg.github.com/ethomson/myrepo/app:${VERSION}
env:
CI: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment