Split docker and deploy workflows to avoid issues with conditionals
This commit is contained in:
parent
6d1db6b18e
commit
dad0cd00e6
2 changed files with 23 additions and 9 deletions
22
.github/workflows/deploy.yml
vendored
Normal file
22
.github/workflows/deploy.yml
vendored
Normal 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
|
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
|
@ -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 .
|
||||
|
|
Reference in a new issue