File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -161,13 +161,15 @@ jobs:
161161 - name : Log in to Azure Container Registry
162162 run : az acr login --name ${{ secrets.ACR_NAME }}
163163
164- - name : Push tags
164+ - name : Build and push tags
165165 uses : docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
166166 with :
167167 context : .
168168 push : true
169169 tags : ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard:${{ github.ref_name }}
170170 platforms : linux/amd64,linux/arm64,linux/arm/v7
171+ build-args : |
172+ RELEASE_TAG=${{github.ref_name}}
171173
172174 release-production :
173175 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 11# Stage 1: Build the application
22FROM alpine:latest AS builder
33
4- WORKDIR /usr/src/app
4+ ARG RELEASE_TAG
55
6- RUN apk --no-cache add curl jq
6+ WORKDIR /usr/src/app
77
8- RUN latest_release=$(curl --silent "https://api.github.com/repos/dkhalife/tasks-backend/releases/latest" | jq -r .tag_name) && \
9- set -ex; \
8+ RUN apk --no-cache add curl
9+ RUN set -ex; \
1010 apkArch="$(apk --print-arch)" ; \
1111 case "$apkArch" in \
1212 armhf) arch='armv6' ;; \
@@ -15,7 +15,7 @@ RUN latest_release=$(curl --silent "https://api.github.com/repos/dkhalife/tasks-
1515 x86_64) arch='x86_64' ;; \
1616 *) echo >&2 "error: unsupported architecture: $apkArch" ; exit 1 ;; \
1717 esac; \
18- curl -fL "https://github.com/dkhalife/tasks-backend/releases/download/${latest_release }/task-wizard_Linux_$arch.tar.gz" | tar -xz -C .
18+ curl -fL "https://github.com/dkhalife/tasks-backend/releases/download/${RELEASE_TAG }/task-wizard_Linux_$arch.tar.gz" | tar -xz -C .
1919
2020# Stage 2: Create a smaller runtime image
2121FROM alpine:latest
You can’t perform that action at this time.
0 commit comments