Adjust workflows for cb/latest/pr

This commit is contained in:
Sander Saares 2019-12-23 19:15:28 +02:00
parent b55e8f33b4
commit 9a8be857b8
3 changed files with 36 additions and 2 deletions

7
.github/workflows/pr.yml vendored Normal file
View file

@ -0,0 +1,7 @@
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: docker build .

View file

@ -1,4 +1,6 @@
on: [push, pull_request]
on:
push:
branches: ['master']
jobs:
build:
runs-on: ubuntu-latest
@ -16,6 +18,7 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: sandersaares/test123
name: sandersaares/test123:cb
username: sandersaares
password: ${{ secrets.docker_hub_token }}
snapshot: true

View file

@ -0,0 +1,24 @@
on:
push:
branches: ['publish-latest']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- id: make_version_string
uses: ./.github/actions/make-version-string
with:
assemblyInfoPath: AssemblyInfo.cs
- uses: ./.github/actions/expand-tokens
env:
VERSIONSTRING: ${{ steps.make_version_string.outputs.versionstring }}
with:
path: Constants.cs
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: sandersaares/test123:latest
username: sandersaares
password: ${{ secrets.docker_hub_token }}
snapshot: true