1
Fork 0

Split docker and deploy workflows to avoid issues with conditionals

This commit is contained in:
Jake Howard 2020-04-25 16:59:51 +01:00
parent 6d1db6b18e
commit dad0cd00e6
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 23 additions and 9 deletions

22
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Docker
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build container
run: docker build --tag docker.pkg.github.com/${GITHUB_REPOSITORY,,}/website:latest .
- name: Log into GitHub Docker Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${GITHUB_REPOSITORY%/*} --password-stdin
- name: Push the Docker container
run: docker push docker.pkg.github.com/${GITHUB_REPOSITORY,,}/website:latest

View File

@ -10,12 +10,4 @@ jobs:
- uses: actions/checkout@v1
- name: Build container
run: docker build --tag docker.pkg.github.com/${GITHUB_REPOSITORY,,}/website:latest .
- name: Log into GitHub Docker Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${GITHUB_REPOSITORY%/*} --password-stdin
if: github.ref == 'master'
- name: Push the Docker container
run: docker push docker.pkg.github.com/${GITHUB_REPOSITORY,,}/website:latest
if: github.ref == 'master'
run: docker build .