build: requested changes
This commit is contained in:
parent
fe43e2fd52
commit
df860516a1
1 changed files with 14 additions and 10 deletions
24
.github/workflows/build-publish.yml
vendored
24
.github/workflows/build-publish.yml
vendored
|
@ -28,8 +28,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Retrieve version
|
- name: Retrieve nginx-proxy version
|
||||||
run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV
|
id: nginx-proxy_version
|
||||||
|
run: echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Get Docker tags for Debian based image
|
- name: Get Docker tags for Debian based image
|
||||||
id: docker_meta_debian
|
id: docker_meta_debian
|
||||||
|
@ -67,7 +68,8 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Retrieve docker-gen version
|
- name: Retrieve docker-gen version
|
||||||
run: echo "DOCKER_GEN_VERSION=$(grep -o -E 'nginxproxy/docker-gen:([0-9x\.]+)' Dockerfile | cut -d ':' -f2)" >> $GITHUB_ENV
|
id: docker-gen_version
|
||||||
|
run: sed -n -e 's;^FROM nginxproxy/docker-gen:\([0-9.]*\).*;VERSION=\1;p' Dockerfile >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build and push the Debian based image
|
- name: Build and push the Debian based image
|
||||||
id: docker_build_debian
|
id: docker_build_debian
|
||||||
|
@ -76,8 +78,8 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
build-args: |
|
build-args: |
|
||||||
NGINX_PROXY_VERSION=${{ env.GIT_DESCRIBE }}
|
NGINX_PROXY_VERSION=${{ steps.nginx-proxy_version.outputs.VERSION }}
|
||||||
DOCKER_GEN_VERSION=${{ env.DOCKER_GEN_VERSION }}
|
DOCKER_GEN_VERSION=${{ steps.docker-gen_version.outputs.VERSION }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.docker_meta_debian.outputs.tags }}
|
tags: ${{ steps.docker_meta_debian.outputs.tags }}
|
||||||
|
@ -95,8 +97,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Retrieve version
|
- name: Retrieve nginx-proxy version
|
||||||
run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV
|
id: nginx-proxy_version
|
||||||
|
run: echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Get Docker tags for Alpine based image
|
- name: Get Docker tags for Alpine based image
|
||||||
id: docker_meta_alpine
|
id: docker_meta_alpine
|
||||||
|
@ -135,7 +138,8 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Retrieve docker-gen version
|
- name: Retrieve docker-gen version
|
||||||
run: echo "DOCKER_GEN_VERSION=$(grep -o -E 'nginxproxy/docker-gen:([0-9x\.]+)' Dockerfile | cut -d ':' -f2)" >> $GITHUB_ENV
|
id: docker-gen_version
|
||||||
|
run: sed -n -e 's;^FROM nginxproxy/docker-gen:\([0-9.]*\).*;VERSION=\1;p' Dockerfile >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Build and push the Alpine based image
|
- name: Build and push the Alpine based image
|
||||||
id: docker_build_alpine
|
id: docker_build_alpine
|
||||||
|
@ -144,8 +148,8 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile.alpine
|
file: Dockerfile.alpine
|
||||||
build-args: |
|
build-args: |
|
||||||
NGINX_PROXY_VERSION=${{ env.GIT_DESCRIBE }}
|
NGINX_PROXY_VERSION=${{ steps.nginx-proxy_version.outputs.VERSION }}
|
||||||
DOCKER_GEN_VERSION=${{ env.DOCKER_GEN_VERSION }}
|
DOCKER_GEN_VERSION=${{ steps.docker-gen_version.outputs.VERSION }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.docker_meta_alpine.outputs.tags }}
|
tags: ${{ steps.docker_meta_alpine.outputs.tags }}
|
||||||
|
|
Loading…
Reference in a new issue