Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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