build: requested changes

This commit is contained in:
Nicolas Duchon 2023-05-01 22:04:17 +02:00
parent fe43e2fd52
commit df860516a1
No known key found for this signature in database
GPG key ID: EA3151C66A4D79E7

View file

@ -28,8 +28,9 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve version
run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV
- name: Retrieve nginx-proxy version
id: nginx-proxy_version
run: echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
- name: Get Docker tags for Debian based image
id: docker_meta_debian
@ -67,7 +68,8 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- 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
id: docker_build_debian
@ -76,8 +78,8 @@ jobs:
context: .
file: Dockerfile
build-args: |
NGINX_PROXY_VERSION=${{ env.GIT_DESCRIBE }}
DOCKER_GEN_VERSION=${{ env.DOCKER_GEN_VERSION }}
NGINX_PROXY_VERSION=${{ steps.nginx-proxy_version.outputs.VERSION }}
DOCKER_GEN_VERSION=${{ steps.docker-gen_version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.docker_meta_debian.outputs.tags }}
@ -95,8 +97,9 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve version
run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV
- name: Retrieve nginx-proxy version
id: nginx-proxy_version
run: echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
- name: Get Docker tags for Alpine based image
id: docker_meta_alpine
@ -135,7 +138,8 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- 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
id: docker_build_alpine
@ -144,8 +148,8 @@ jobs:
context: .
file: Dockerfile.alpine
build-args: |
NGINX_PROXY_VERSION=${{ env.GIT_DESCRIBE }}
DOCKER_GEN_VERSION=${{ env.DOCKER_GEN_VERSION }}
NGINX_PROXY_VERSION=${{ steps.nginx-proxy_version.outputs.VERSION }}
DOCKER_GEN_VERSION=${{ steps.docker-gen_version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.docker_meta_alpine.outputs.tags }}