-
Notifications
You must be signed in to change notification settings - Fork 30
24 lines (24 loc) · 967 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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