Support versioned Docker builds (#1799)
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
name: Deploy docker
|
||||
on: [push]
|
||||
env:
|
||||
DEPLOY_NAME: gollumwiki/gollum:latest
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
steps:
|
||||
- name: Set deploy name to master
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
echo "DEPLOY_NAME=gollumwiki/gollum:master"
|
||||
- name: Set deploy name to release version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
echo "DEPLOY_NAME=gollumwiki/gollum:${{ github.ref_name }}"
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Login
|
||||
@@ -36,4 +46,4 @@ jobs:
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
Reference in New Issue
Block a user