Skip to content

Commit 7076444

Browse files
authored
Merge pull request #56 from devilbox/fix-deprecation
Fix deprecation
2 parents 38ab9d2 + 7ef54ab commit 7076444

File tree

2 files changed

+20
-36
lines changed

2 files changed

+20
-36
lines changed

.github/workflows/docker-multistage-build.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ on:
2323
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
2424
required: true
2525
type: string
26-
artifact_prev_name_add_version:
27-
description: 'Add version to artifact name to download.'
28-
required: false
29-
default: true
30-
type: boolean
31-
artifact_curr_name_add_version:
32-
description: 'Add version to artifact name to upload.'
33-
required: false
34-
default: true
35-
type: boolean
3626
has_refs:
3727
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
3828
required: true
@@ -98,18 +88,10 @@ jobs:
9888
VERSION="${{ matrix.version }}"
9989
ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )"
10090
101-
if [ "${{ inputs.artifact_prev_name_add_version }}" = "true" ]; then
102-
NAME_PREV="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage_prev }}"
103-
else
104-
NAME_PREV="${{ inputs.artifact_prefix }}-${PRE_HASH}-${ARCH}-${{ inputs.stage_prev }}"
105-
fi
106-
if [ "${{ inputs.artifact_curr_name_add_version }}" = "true" ]; then
107-
NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage }}"
108-
else
109-
NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${ARCH}-${{ inputs.stage }}"
110-
fi
111-
echo "::set-output name=prev::${NAME_PREV}"
112-
echo "::set-output name=curr::${NAME_CURR}"
91+
NAME_PREV="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage_prev }}"
92+
NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage }}"
93+
echo "prev::${NAME_PREV}" >> $GITHUB_OUTPUT
94+
echo "curr::${NAME_CURR}" >> $GITHUB_OUTPUT
11395
11496
- name: "[DEBUG] Show setup"
11597
shell: bash

.github/workflows/docker-multistage-configure.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
shell: bash
115115
run: |
116116
if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then
117-
echo "::set-output name=can_login::false"
117+
echo "can_login=false" >> $GITHUB_OUTPUT
118118
else
119-
echo "::set-output name=can_login::true"
119+
echo "can_login=true" >> $GITHUB_OUTPUT
120120
fi
121121
env:
122122
ENV_USER: ${{ secrets.dockerhub_username }}
@@ -130,9 +130,9 @@ jobs:
130130
shell: bash
131131
run: |
132132
if [ "${{ steps.set-login.outputs.can_login }}" = "true" ] && [ "${{ inputs.can_deploy }}" = "true" ]; then
133-
echo "::set-output name=can_push::true"
133+
echo "can_push=true" >> $GITHUB_OUTPUT
134134
else
135-
echo "::set-output name=can_push::false"
135+
echo "can_push=false" >> $GITHUB_OUTPUT
136136
fi
137137
138138
###
@@ -145,9 +145,11 @@ jobs:
145145
DEFAULT_BRANCH="$( echo '${{ inputs.refs }}' | jq -M -c -r '.DEFAULT_BRANCH' )"
146146
BRANCHES="$( echo '${{ inputs.refs }}' | jq -M -c -r '.BRANCHES' )"
147147
NUM_LATEST_TAGS="$( echo '${{ inputs.refs }}' | jq -M -c -r '.NUM_LATEST_TAGS' )"
148-
echo "::set-output name=default_branch::${DEFAULT_BRANCH}"
149-
echo "::set-output name=branches::${BRANCHES}"
150-
echo "::set-output name=num_latest_tags::${NUM_LATEST_TAGS}"
148+
149+
echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT
150+
echo "branches=${BRANCHES}" >> $GITHUB_OUTPUT
151+
echo "num_latest_tags=${NUM_LATEST_TAGS}" >> $GITHUB_OUTPUT
152+
151153
echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}"
152154
echo "BRANCHES=${BRANCHES}"
153155
echo "NUM_LATEST_TAGS=${NUM_LATEST_TAGS}"
@@ -176,7 +178,7 @@ jobs:
176178
run: |
177179
PRE_DATE="$( date +"%s" )"
178180
PRE_RAND="$( echo $RANDOM | md5sum | head -c 10 )"
179-
echo "::set-output name=prefix::${PRE_DATE}-${PRE_RAND}"
181+
echo "prefix=${PRE_DATE}-${PRE_RAND}" >> $GITHUB_OUTPUT
180182
181183
###
182184
### Set Build and Deploy Matrix
@@ -196,9 +198,9 @@ jobs:
196198
--argjson refs '${{ steps.set-refs.outputs.matrix }}' \
197199
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], refs:$refs[]})' <<<'${{ inputs.versions }}' \
198200
)"
199-
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
200-
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
201-
echo "::set-output name=has_refs::true"
201+
echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT
202+
echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT
203+
echo "has_refs=true" >> $GITHUB_OUTPUT
202204
else
203205
MATRIX_BUILD="$( \
204206
jq -M -c \
@@ -208,9 +210,9 @@ jobs:
208210
jq -M -c \
209211
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[]})' <<<'${{ inputs.versions }}' \
210212
)"
211-
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
212-
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
213-
echo "::set-output name=has_refs::false"
213+
echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT
214+
echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT
215+
echo "has_refs=false" >> $GITHUB_OUTPUT
214216
fi
215217
216218
# ------------------------------------------------------------

0 commit comments

Comments
 (0)