mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
fix version in docker builds
This commit is contained in:
parent
7b348888d7
commit
929c95f9ae
22
.github/workflows/docker-publish.yml
vendored
22
.github/workflows/docker-publish.yml
vendored
@ -26,6 +26,13 @@ jobs:
|
|||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=identifier::$(echo ${GITHUB_REF##*/})"
|
||||||
|
echo "::set-output name=hash::$(echo ${GITHUB_SHA} | cut -c1-7)"
|
||||||
|
id: get_version
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
@ -55,8 +62,8 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_IDENTIFIER=${GITHUB_REF##*/}
|
BUILD_IDENTIFIER=${{ steps.get_version.outputs.identifier }}
|
||||||
BUILD_VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)
|
BUILD_VERSION=${{ steps.get_version.outputs.hash }}
|
||||||
|
|
||||||
build-github:
|
build-github:
|
||||||
name: Push Docker image to Github Container Registry
|
name: Push Docker image to Github Container Registry
|
||||||
@ -69,6 +76,13 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=identifier::$(echo ${GITHUB_REF##*/})"
|
||||||
|
echo "::set-output name=hash::$(echo ${GITHUB_SHA} | cut -c1-7)"
|
||||||
|
id: get_version
|
||||||
|
|
||||||
# Login against a Docker registry except on PR
|
# Login against a Docker registry except on PR
|
||||||
# https://github.com/docker/login-action
|
# https://github.com/docker/login-action
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
@ -105,5 +119,5 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_IDENTIFIER=${GITHUB_REF##*/}
|
BUILD_IDENTIFIER=${{ steps.get_version.outputs.identifier }}
|
||||||
BUILD_VERSION=$(echo ${GITHUB_SHA} | cut -c1-7)
|
BUILD_VERSION=${{ steps.get_version.outputs.hash }}
|
Loading…
Reference in New Issue
Block a user