Support versioned Docker builds (#1799)

This commit is contained in:
Dawa Ometto
2022-01-12 11:04:12 +01:00
committed by GitHub
parent 6159fcd4a2
commit 0c36cdf5ba
+15 -5
View File
@@ -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 }}