devops: docker-hub release version

This commit is contained in:
Daniel Thomas 2021-11-16 15:52:23 +01:00
parent a1279e10fd
commit faeea9fabf

View File

@ -40,6 +40,12 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: foomo/contentfulproxy
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
@ -50,20 +56,15 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1
- name: Set tag on output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/contentfulproxy:$RELEASE_VERSION
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}