Merge pull request #107 from noocsharp/noocsharp-patch-1-2 #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: publish commit | |
run: | | |
docker login https://docker.pkg.github.com -u swlkr -p ${{ secrets.GITHUB_TOKEN }} | |
docker build -t joy:${GITHUB_SHA} -f ./docker/Dockerfile . | |
docker tag joy:${GITHUB_SHA} docker.pkg.github.com/joy-framework/joy/joy-web:${GITHUB_SHA} | |
docker push docker.pkg.github.com/joy-framework/joy/joy-web:${GITHUB_SHA} | |
- name: publish latest | |
if: github.ref == 'refs/heads/master' | |
run: | | |
docker login https://docker.pkg.github.com -u swlkr -p ${{ secrets.GITHUB_TOKEN }} | |
docker build -t joy:${GITHUB_SHA} -f ./docker/Dockerfile . | |
docker tag joy:${GITHUB_SHA} docker.pkg.github.com/joy-framework/joy/joy-web:latest | |
docker push docker.pkg.github.com/joy-framework/joy/joy-web:latest |