Skip to content

Instantly share code, notes, and snippets.

@nebularg
Created October 4, 2019 00:07
Show Gist options
  • Save nebularg/b2cf6c44d8b900596f14853aa4ccad83 to your computer and use it in GitHub Desktop.
Save nebularg/b2cf6c44d8b900596f14853aa4ccad83 to your computer and use it in GitHub Desktop.
name: Docker Image CI
on:
push
branches:
- master
tags:
- *
paths-ignore:
- README.md
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build -t packager .
- name: Publish the Docker image
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
docker login docker.pkg.github.com -u BigWigsMods -p $DOCKER_PASS
docker tag packager docker.pkg.github.com/bigwigsmods/packager/packager:latest
docker push docker.pkg.github.com/bigwigsmods/packager/packager:latest
- name: Publish the Docker image tag
if: startsWith(github.ref, 'ref/tags')
run: |
TAG=${GITHUB_REF##*/}
docker tag packager docker.pkg.github.com/bigwigsmods/packager/packager:$TAG
docker push docker.pkg.github.com/bigwigsmods/packager/packager:$TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment