diff --git a/.github/workflows/docker-multistage-build.yml b/.github/workflows/docker-multistage-build.yml index 36f1cf8..a6336c3 100644 --- a/.github/workflows/docker-multistage-build.yml +++ b/.github/workflows/docker-multistage-build.yml @@ -35,13 +35,33 @@ on: description: 'Dertermines whether we upload the artifact not.' required: true type: boolean + push_image: + description: 'Push docker image after build (and test if ran)?' + required: false + type: boolean + default: false + pull_base_image: + description: 'Pull Docker base image before building?' + required: false + type: boolean + default: false + ### + ### Secrets + ### + secrets: + dockerhub_username: + description: 'The username for Dockerhub.' + required: false + dockerhub_password: + description: 'The password for Dockerhub.' + required: false jobs: # ----------------------------------------------------------------------------------------------- # JOB: BUILD # ----------------------------------------------------------------------------------------------- build: - name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.stage }} (${{ matrix.arch }}) ${{ matrix.refs }} + name: ${{ matrix.NAME }}-${{ matrix.VERSION }}-${{ inputs.stage }} (${{ matrix.ARCH }}) ${{ matrix.REFS }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -58,15 +78,16 @@ jobs: fetch-depth: 0 if: ${{ !inputs.has_refs }} - - name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})" + - name: "[SETUP] Checkout repository (ref: ${{ matrix.REFS }})" uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{ matrix.refs }} + ref: ${{ matrix.REFS }} if: ${{ inputs.has_refs }} - - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + - name: "[SETUP] Install QEMU environment" + uses: docker/setup-qemu-action@v2 + id: qemu with: image: tonistiigi/binfmt:latest platforms: all @@ -74,35 +95,37 @@ jobs: - name: "[SETUP] Set artifact names" id: set-artifact-name run: | - PRE_HASH="$( git rev-parse HEAD | head -c 10 )" - VERSION="${{ matrix.version }}" - ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )" + VERSION="$( echo "${{ matrix.VERSION }}" )" + ARCH="$( echo "${{ matrix.ARCH }}" | sed 's|/|-|g' )" + + NAME_PREV="${{ inputs.artifact_prefix }}-${VERSION}-${ARCH}-${{ inputs.stage_prev }}" + NAME_CURR="${{ inputs.artifact_prefix }}-${VERSION}-${ARCH}-${{ inputs.stage }}" + echo "prev=${NAME_PREV}" >> $GITHUB_OUTPUT + echo "curr=${NAME_CURR}" >> $GITHUB_OUTPUT + + - name: "[SETUP] Determine Docker tag" + id: tag + uses: cytopia/docker-tag-action@v0.4.22 - NAME_PREV="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage_prev }}" - NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage }}" - echo "::set-output name=prev::${NAME_PREV}" - echo "::set-output name=curr::${NAME_CURR}" + # https://github.com/alpinelinux/docker-alpine/issues/98 + - name: "[SETUP] Fix Docker IP forwarding" + run: | + sysctl net.ipv4.ip_forward + sudo sysctl -w net.ipv4.ip_forward=1 + sudo systemctl restart docker # ------------------------------------------------------------ # Artifact Import # ------------------------------------------------------------ - - ### - ### Download and import previously built image (if it exists) - ### - name: "[Artifact Load] Download previously built image" - uses: Wandalen/wretry.action@v1.0.11 + uses: cytopia/download-artifact-retry-action@v0.1.5 with: - action: actions/download-artifact@v3 - with: | - name: ${{ steps.set-artifact-name.outputs.prev }} - attempt_limit: 20 - attempt_delay: 10000 + name: ${{ steps.set-artifact-name.outputs.prev }} if: ${{ inputs.stage_prev != '' }} - name: "[Artifact Load] Import previously built image" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make load INFILE=${{ steps.set-artifact-name.outputs.prev }} @@ -112,66 +135,65 @@ jobs: # ------------------------------------------------------------ # Build # ------------------------------------------------------------ + - name: Pull + uses: cytopia/shell-command-retry-action@v0.1.6 + with: + command: | + make docker-pull-base-image VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} + if: ${{ inputs.pull_base_image }} + - name: Build - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make build VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} + make build VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} # ------------------------------------------------------------ # Test # ------------------------------------------------------------ - name: Test - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make test VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} + make test VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} if: ${{ inputs.run_tests }} # ------------------------------------------------------------ - # Artifact Export + # Push # ------------------------------------------------------------ - - ### - ### Export current image - ### - - name: "[Artifact Save] Export currently built image" - uses: cytopia/shell-command-retry-action@v0.1.3 + - name: Docker Tag + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make save-verify VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.curr }} INFILE=${{ steps.set-artifact-name.outputs.curr }} - if: ${{ inputs.upload_artifact }} + make tag VERSION="${{ matrix.VERSION }}" STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} TAG=${{ steps.tag.outputs.docker-tag }} - ### - ### Upload current image - ### - - name: "[Artifact Save] Upload currently built image" - uses: Wandalen/wretry.action@v1.0.11 + - name: Docker login + uses: docker/login-action@v2 with: - action: actions/upload-artifact@v3 - with: | - name: ${{ steps.set-artifact-name.outputs.curr }} - path: ${{ steps.set-artifact-name.outputs.curr }} - if-no-files-found: error - attempt_limit: 20 - attempt_delay: 10000 - if: ${{ inputs.upload_artifact }} + username: ${{ secrets.dockerhub_username }} + password: ${{ secrets.dockerhub_password }} + if: ${{ inputs.push_image }} - ### - ### Verify uploaded image - ### - - name: "[Artifact Save] Download (verify)" - uses: actions/download-artifact@v3 + - name: Docker push + uses: cytopia/shell-command-retry-action@v0.1.6 with: - name: ${{ steps.set-artifact-name.outputs.curr }} - path: ${{ steps.set-artifact-name.outputs.curr }}.tmp - if: ${{ inputs.upload_artifact }} + command: | + make push VERSION="${{ matrix.version }}" STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + if: ${{ inputs.push_image }} - - name: "[Artifact Save] Import (verify)" - uses: cytopia/shell-command-retry-action@v0.1.3 + + # ------------------------------------------------------------ + # Artifact Export + # ------------------------------------------------------------ + - name: "[Artifact Save] Upload built artifact" + uses: cytopia/upload-artifact-retry-action@v0.1.7 with: - command: | - make load INFILE=${{ steps.set-artifact-name.outputs.curr }}.tmp + name: ${{ steps.set-artifact-name.outputs.curr }} + path: ${{ steps.set-artifact-name.outputs.curr }} + pre_command: | + make save-verify VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} OUTFILE=${{ steps.set-artifact-name.outputs.curr }} INFILE=${{ steps.set-artifact-name.outputs.curr }} + post_command: | + make load INFILE={{download_path}} if: ${{ inputs.upload_artifact }} diff --git a/.github/workflows/docker-multistage-configure.yml b/.github/workflows/docker-multistage-configure.yml index 8d3a2d4..fe7c741 100644 --- a/.github/workflows/docker-multistage-configure.yml +++ b/.github/workflows/docker-multistage-configure.yml @@ -23,10 +23,16 @@ on: description: 'Determines whether this workflow can deploy (login and push).' required: true type: boolean - is_scheduled: - description: "Usage for a scheduled job? Only then we will evaluate git refs and add them to build matrix." - required: true - type: boolean + fields_build: + description: 'The JSON string for build fields to extract' + required: false + type: string + default: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}, {"ARCH":"ARCH"}]' + fields_deploy: + description: 'The JSON string for deploy fields to extract' + required: false + type: string + default: '[{"VERSION":"VERSION"}, {"FLAVOUR":"FLAVOUR"}]' ### ### Input Secrets @@ -57,10 +63,10 @@ on: can_push: description: "(boolean) Can we push to Dockerhub?" value: ${{ jobs.configure.outputs.can_push }} + # Determined settings (values) has_refs: - description: "(boolean) Do we have refs? (used for nightly builds)" + description: "(string) 'true' or 'false' Do we have refs to build?" value: ${{ jobs.configure.outputs.has_refs }} - # Determined settings (values) matrix_build: description: "(string) The determined JSON string build matrix." value: ${{ jobs.configure.outputs.matrix_build }} @@ -91,9 +97,10 @@ jobs: # Flags can_login: ${{ steps.set-login.outputs.can_login }} can_push: ${{ steps.set-push.outputs.can_push }} + # Settings has_refs: ${{ steps.set-refs.outputs.has_refs }} - # Values artifact_prefix: ${{ steps.set-artifact-prefix.outputs.prefix }} + # Values matrix_build: ${{ steps.set-matrix.outputs.matrix_build }} matrix_deploy: ${{ steps.set-matrix.outputs.matrix_deploy }} @@ -114,9 +121,9 @@ jobs: shell: bash run: | if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then - echo "::set-output name=can_login::false" + echo "can_login=false" >> $GITHUB_OUTPUT else - echo "::set-output name=can_login::true" + echo "can_login=true" >> $GITHUB_OUTPUT fi env: ENV_USER: ${{ secrets.dockerhub_username }} @@ -130,11 +137,15 @@ jobs: shell: bash run: | if [ "${{ steps.set-login.outputs.can_login }}" = "true" ] && [ "${{ inputs.can_deploy }}" = "true" ]; then - echo "::set-output name=can_push::true" + echo "can_push=true" >> $GITHUB_OUTPUT else - echo "::set-output name=can_push::false" + echo "can_push=false" >> $GITHUB_OUTPUT fi + # ------------------------------------------------------------ + # Set values + # ------------------------------------------------------------ + ### ### Do we have refs to build against? ### @@ -145,27 +156,27 @@ jobs: DEFAULT_BRANCH="$( echo '${{ inputs.refs }}' | jq -M -c -r '.DEFAULT_BRANCH' )" BRANCHES="$( echo '${{ inputs.refs }}' | jq -M -c -r '.BRANCHES' )" NUM_LATEST_TAGS="$( echo '${{ inputs.refs }}' | jq -M -c -r '.NUM_LATEST_TAGS' )" - echo "::set-output name=default_branch::${DEFAULT_BRANCH}" - echo "::set-output name=branches::${BRANCHES}" - echo "::set-output name=num_latest_tags::${NUM_LATEST_TAGS}" + + echo "default_branch=${DEFAULT_BRANCH}" >> $GITHUB_OUTPUT + echo "branches=${BRANCHES}" >> $GITHUB_OUTPUT + echo "num_latest_tags=${NUM_LATEST_TAGS}" >> $GITHUB_OUTPUT + echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}" echo "BRANCHES=${BRANCHES}" echo "NUM_LATEST_TAGS=${NUM_LATEST_TAGS}" - - name: "[Set-Output] has_refs and matrix (ref-matrix) (branches and latest tags)" + ### + ### Set Refs + ### + - name: "[Set-Output] has_refs and ref-matrix" id: set-refs - uses: cytopia/git-ref-matrix-action@v0.1.11 + uses: cytopia/git-ref-matrix-action@v0.1.13 with: repository_default_branch: ${{ steps.eval-refs.outputs.default_branch }} branches: ${{ steps.eval-refs.outputs.branches }} num_latest_tags: ${{ steps.eval-refs.outputs.num_latest_tags }} # Only use refs if the job is a schedule or if the job is schedule and was triggered manually - disable_refs: ${{ !(inputs.is_scheduled && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')) }} - - - # ------------------------------------------------------------ - # Set values - # ------------------------------------------------------------ + disable_refs: ${{ !(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} ### ### Unique Artifact prefix @@ -174,9 +185,9 @@ jobs: id: set-artifact-prefix shell: bash run: | - PRE_DATE="$( date +"%s" )" - PRE_RAND="$( echo $RANDOM | md5sum | head -c 10 )" - echo "::set-output name=prefix::${PRE_DATE}-${PRE_RAND}" + PRE_RUN="$( echo '${{ github.run_id }}' )" + PRE_SHA="$( echo '${{ github.sha }}' | md5sum | head -c 10 )" + echo "prefix=${PRE_RUN}-${PRE_SHA}" >> $GITHUB_OUTPUT ### ### Set Build and Deploy Matrix @@ -185,32 +196,52 @@ jobs: id: set-matrix shell: bash run: | + FIELDS_BUILD="$( echo '${{ inputs.fields_build }}' | jq -M -c )" + FIELDS_DEPLOY="$( echo '${{ inputs.fields_deploy }}' | jq -M -c )" + VERSIONS="$( echo '${{ inputs.versions }}' | jq -M -c )" + if [ "${{ steps.set-refs.outputs.has_refs }}" = "true" ]; then - MATRIX_BUILD="$( \ - jq -M -c \ - --argjson refs '${{ steps.set-refs.outputs.matrix }}' \ - 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[], refs:$refs[]})' <<<'${{ inputs.versions }}' \ - )" - MATRIX_DEPLOY="$( \ - jq -M -c \ - --argjson refs '${{ steps.set-refs.outputs.matrix }}' \ - 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], refs:$refs[]})' <<<'${{ inputs.versions }}' \ - )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::true" + REFS="$( echo '${{ steps.set-refs.outputs.matrix }}' | jq -M -c )" + + # map({NAME: .NAME, VERSION: .VERSION[], FLAVOUR: .FLAVOUR[], ARCH:. ARCH[], ...}) + INNER_STRING="$( echo "${FIELDS_BUILD}" \ + | jq -r '.[] | to_entries[] | "\(.value): .\(.key)[]"' \ + | jq --raw-input --slurp 'split("\n") | map(select(. != ""))' \ + | jq -r '. | join(", ")' )" + OUTER_STRING="$( echo "'map({NAME: .NAME, ${INNER_STRING}, REFS: ${REFS}[]})'" )" + MATRIX_BUILD="$( eval jq -M -c "${OUTER_STRING}" <<<"${VERSIONS}" )" + + # map({NAME: .NAME, VERSION: .VERSION[], FLAVOUR: .FLAVOUR[], ....}) + INNER_STRING="$( echo "${FIELDS_DEPLOY}" \ + | jq -r '.[] | to_entries[] | "\(.value): .\(.key)[]"' \ + | jq --raw-input --slurp 'split("\n") | map(select(. != ""))' \ + | jq -r '. | join(", ")' )" + OUTER_STRING="$( echo "'map({NAME: .NAME, ${INNER_STRING}, REFS: ${REFS}[]})'" )" + MATRIX_DEPLOY="$( eval jq -M -c "${OUTER_STRING}" <<<"${VERSIONS}" )" + + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT + else - MATRIX_BUILD="$( \ - jq -M -c \ - 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[]})' <<<'${{ inputs.versions }}' \ - )" - MATRIX_DEPLOY="$( \ - jq -M -c \ - 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[]})' <<<'${{ inputs.versions }}' \ - )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::false" + + # map({NAME: .NAME, VERSION: .VERSION[], FLAVOUR: .FLAVOUR[], ARCH:. ARCH[], ...}) + INNER_STRING="$( echo "${FIELDS_BUILD}" \ + | jq -r '.[] | to_entries[] | "\(.value): .\(.key)[]"' \ + | jq --raw-input --slurp 'split("\n") | map(select(. != ""))' \ + | jq -r '. | join(", ")' )" + OUTER_STRING="$( echo "'map({NAME: .NAME, ${INNER_STRING}})'" )" + MATRIX_BUILD="$( eval jq -M -c "${OUTER_STRING}" <<<"${VERSIONS}" )" + + # map({NAME: .NAME, VERSION: .VERSION[], FLAVOUR: .FLAVOUR[], ....}) + INNER_STRING="$( echo "${FIELDS_DEPLOY}" \ + | jq -r '.[] | to_entries[] | "\(.value): .\(.key)[]"' \ + | jq --raw-input --slurp 'split("\n") | map(select(. != ""))' \ + | jq -r '. | join(", ")' )" + OUTER_STRING="$( echo "'map({NAME: .NAME, ${INNER_STRING}})'" )" + MATRIX_DEPLOY="$( eval jq -M -c "${OUTER_STRING}" <<<"${VERSIONS}" )" + + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT fi # ------------------------------------------------------------ @@ -230,6 +261,8 @@ jobs: echo '-------------------------------------|-----------------------------------' echo 'github.event_name | ${{ github.event_name }}' echo '-------------------------------------|-----------------------------------' + echo 'github.ref | ${{ github.ref }}' + echo '-------------------------------------|-----------------------------------' echo 'github.ref_name | ${{ github.ref_name }}' echo '-------------------------------------|-----------------------------------' echo 'github.head_ref | ${{ github.head_ref }}' @@ -239,14 +272,20 @@ jobs: echo 'github.ref_type | ${{ github.ref_type }}' echo '-------------------------------------|-----------------------------------' echo 'github.repository | ${{ github.repository }}' + echo '-------------------------------------|-----------------------------------' + echo 'github.action | ${{ github.action }}' + echo '-------------------------------------|-----------------------------------' + echo 'github.action_ref | ${{ github.action_ref }}' + echo '-------------------------------------|-----------------------------------' + echo 'github.run_id | ${{ github.run_id }}' + echo '-------------------------------------|-----------------------------------' + echo 'github.sha | ${{ github.sha }}' - name: "[DEBUG] Show Workflow Inputs" shell: bash run: | echo 'enabled: ${{ inputs.enabled }}' echo 'can_deploy: ${{ inputs.can_deploy }}' - echo 'is_scheduled: ${{ inputs.is_scheduled }}' - echo 'can_deploy: ${{ inputs.can_deploy }}' echo 'versions: ${{ inputs.versions }}' echo 'refs: ${{ inputs.refs }}' @@ -259,6 +298,7 @@ jobs: # Flags echo 'can_login: ${{ steps.set-login.outputs.can_login }}' echo 'can_push: ${{ steps.set-push.outputs.can_push }}' + # Settins echo 'has_refs: ${{ steps.set-refs.outputs.has_refs }}' # Values echo 'artifact_prefix: ${{ steps.set-artifact-prefix.outputs.prefix }}' diff --git a/.github/workflows/docker-multistage-push-image.yml b/.github/workflows/docker-multistage-push-image.yml index 776c026..37ab390 100644 --- a/.github/workflows/docker-multistage-push-image.yml +++ b/.github/workflows/docker-multistage-push-image.yml @@ -42,8 +42,8 @@ jobs: # ----------------------------------------------------------------------------------------------- # JOB: DEPLOY # ----------------------------------------------------------------------------------------------- - test: - name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.stage }} (${{ matrix.arch }}) ${{ matrix.refs }} + deploy: + name: ${{ matrix.NAME }}-${{ matrix.VERSION }}-${{ inputs.stage }} (${{ matrix.ARCH }}) ${{ matrix.REFS }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -60,32 +60,31 @@ jobs: fetch-depth: 0 if: ${{ !inputs.has_refs }} - - name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})" + - name: "[SETUP] Checkout repository (ref: ${{ matrix.REFS }})" uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{ matrix.refs }} + ref: ${{ matrix.REFS }} if: ${{ inputs.has_refs }} - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 - name: "[SETUP] Set artifact names" id: set-artifact-name run: | - PRE_HASH="$( git rev-parse HEAD | head -c 10 )" - VERSION="${{ matrix.version }}" - ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )" + VERSION="${{ matrix.VERSION }}" + ARCH="$( echo "${{ matrix.ARCH }}" | sed 's|/|-|g' )" - NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage }}" - echo "::set-output name=curr::${NAME_CURR}" + NAME_CURR="${{ inputs.artifact_prefix }}-${VERSION}-${ARCH}-${{ inputs.stage }}" + echo "curr=${NAME_CURR}" >> $GITHUB_OUTPUT # ------------------------------------------------------------ @@ -96,16 +95,12 @@ jobs: ### Download and import previously built image ### - name: "[Artifact Load] Download previously built image" - uses: Wandalen/wretry.action@v1.0.11 + uses: cytopia/download-artifact-retry-action@v0.1.5 with: - action: actions/download-artifact@v3 - with: | - name: ${{ steps.set-artifact-name.outputs.curr }} - attempt_limit: 20 - attempt_delay: 10000 + name: ${{ steps.set-artifact-name.outputs.curr }} - name: "[Artifact Load] Import previously built image" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make load INFILE=${{ steps.set-artifact-name.outputs.curr }} @@ -115,10 +110,10 @@ jobs: # Re-tag images # ------------------------------------------------------------ - name: "[Docker Tag] Retag" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make tag VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} TAG=${{ steps.tag.outputs.docker-tag }} + make tag VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} TAG=${{ steps.tag.outputs.docker-tag }} - name: "[Docker Tag] Show images" run: | @@ -129,7 +124,7 @@ jobs: # Login # ------------------------------------------------------------ - name: Login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -140,8 +135,8 @@ jobs: # Push images # ------------------------------------------------------------ - name: Push Image - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make push VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make push VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} TAG=${{ steps.tag.outputs.docker-tag }} if: ${{ inputs.can_deploy }} diff --git a/.github/workflows/docker-multistage-push-manifest.yml b/.github/workflows/docker-multistage-push-manifest.yml index 435448e..f1e48ea 100644 --- a/.github/workflows/docker-multistage-push-manifest.yml +++ b/.github/workflows/docker-multistage-push-manifest.yml @@ -1,3 +1,4 @@ +--- name: Deploy multi-arch image manifests on: @@ -27,6 +28,7 @@ on: required: true type: boolean + ### ### Secrets ### @@ -43,7 +45,7 @@ jobs: # JOB (3/3): DEPLOY # ----------------------------------------------------------------------------------------------- deploy: - name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.stage }} ${{ matrix.refs }} + name: ${{ matrix.NAME }}-${{ matrix.VERSION }}-${{ inputs.stage }} ${{ matrix.REFS }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -60,33 +62,33 @@ jobs: fetch-depth: 0 if: ${{ !inputs.has_refs }} - - name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})" + - name: "[SETUP] Checkout repository (ref: ${{ matrix.REFS }})" uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{ matrix.refs }} + ref: ${{ matrix.REFS }} if: ${{ inputs.has_refs }} - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 - name: "[SETUP] Determine manifest arches" id: manifest run: | ARCHES="$( echo '${{ inputs.versions }}' \ - | jq 'group_by(.NAME, .VERSION, .ARCH)' \ + | jq 'group_by(.NAME, .VERSION, .FLAVOUR, .ARCH)' \ | jq 'map({NAME: .[].NAME, VERSION: .[].VERSION[], FLAVOUR: .[].FLAVOUR[], ARCHES: .[].ARCH|join(",")})' \ - | jq '.[] | select(.NAME=="${{ matrix.name }}" and .VERSION=="${{ matrix.version }}" and .FLAVOUR=="${{ matrix.flavour }}") | .ARCHES' \ + | jq '.[] | select(.NAME=="${{ matrix.NAME }}" and .VERSION=="${{ matrix.VERSION }}" and .FLAVOUR=="${{ matrix.FLAVOUR }}") | .ARCHES' \ | jq -c -M \ )" - echo "::set-output name=arches::${ARCHES}" + echo "arches=${ARCHES}" >> $GITHUB_OUTPUT echo "ARCHES: ${ARCHES}" @@ -94,7 +96,7 @@ jobs: # Login # ------------------------------------------------------------ - name: "Login" - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -104,17 +106,17 @@ jobs: # Create Manifest # ------------------------------------------------------------ - name: "[Create Manifest] (${{ steps.manifest.outputs.arches }})" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-create VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-create VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} # ------------------------------------------------------------ # Deploy Manifest # ------------------------------------------------------------ - name: "[Push Manifest] ${{ steps.tag.outputs.docker-tag }}" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-push VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-push VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} TAG=${{ steps.tag.outputs.docker-tag }} diff --git a/.github/workflows/docker-multistage-test.yml b/.github/workflows/docker-multistage-test.yml index 0090237..0a2d165 100644 --- a/.github/workflows/docker-multistage-test.yml +++ b/.github/workflows/docker-multistage-test.yml @@ -29,7 +29,7 @@ jobs: # JOB: BUILD # ----------------------------------------------------------------------------------------------- test: - name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.stage }} (${{ matrix.arch }}) ${{ matrix.refs }} + name: ${{ matrix.NAME }}-${{ matrix.VERSION }}-${{ inputs.stage }} (${{ matrix.ARCH }}) ${{ matrix.REFS }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -46,15 +46,15 @@ jobs: fetch-depth: 0 if: ${{ !inputs.has_refs }} - - name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})" + - name: "[SETUP] Checkout repository (ref: ${{ matrix.REFS }})" uses: actions/checkout@v3 with: fetch-depth: 0 - ref: ${{ matrix.refs }} + ref: ${{ matrix.REFS }} if: ${{ inputs.has_refs }} - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all @@ -62,12 +62,11 @@ jobs: - name: "[SETUP] Set artifact names" id: set-artifact-name run: | - PRE_HASH="$( git rev-parse HEAD | head -c 10 )" - VERSION="${{ matrix.version }}" - ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )" + VERSION="${{ matrix.VERSION }}" + ARCH="$( echo "${{ matrix.ARCH }}" | sed 's|/|-|g' )" - NAME_CURR="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-${{ inputs.stage }}" - echo "::set-output name=curr::${NAME_CURR}" + NAME_CURR="${{ inputs.artifact_prefix }}-${VERSION}-${ARCH}-${{ inputs.stage }}" + echo "curr=${NAME_CURR}" >> $GITHUB_OUTPUT # ------------------------------------------------------------ @@ -78,16 +77,12 @@ jobs: ### Download and import previously built image ### - name: "[Artifact Load] Download previously built image" - uses: Wandalen/wretry.action@v1.0.11 + uses: cytopia/download-artifact-retry-action@v0.1.5 with: - action: actions/download-artifact@v3 - with: | - name: ${{ steps.set-artifact-name.outputs.curr }} - attempt_limit: 20 - attempt_delay: 10000 + name: ${{ steps.set-artifact-name.outputs.curr }} - name: "[Artifact Load] Import previously built image" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make load INFILE=${{ steps.set-artifact-name.outputs.curr }} @@ -97,7 +92,7 @@ jobs: # Test # ------------------------------------------------------------ - name: Test - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make test VERSION=${{ matrix.version }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} + make test VERSION=${{ matrix.VERSION }} STAGE=${{ inputs.stage }} FLAVOUR=${{ matrix.FLAVOUR }} ARCH=${{ matrix.ARCH }} diff --git a/.github/workflows/docker-name-version-arch.yml b/.github/workflows/docker-name-version-arch.yml index c21a20e..27e2435 100644 --- a/.github/workflows/docker-name-version-arch.yml +++ b/.github/workflows/docker-name-version-arch.yml @@ -53,9 +53,9 @@ jobs: shell: bash run: | if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then - echo "::set-output name=can_login::0" + echo "can_login=0" >> $GITHUB_OUTPUT else - echo "::set-output name=can_login::1" + echo "can_login=1" >> $GITHUB_OUTPUT fi env: ENV_USER: ${{ secrets.dockerhub_username }} @@ -76,9 +76,9 @@ jobs: --argjson refs '${{ inputs.refs }}' \ 'map({name:.NAME, version:.VERSION[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \ )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::1" + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT + echo "has_refs=1" >> $GITHUB_OUTPUT else MATRIX_BUILD="$( \ jq -M -c \ @@ -88,9 +88,9 @@ jobs: jq -M -c \ 'map({name:.NAME, version:.VERSION[]})' <<<'${{ inputs.matrix }}' \ )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::0" + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT + echo "has_refs=0" >> $GITHUB_OUTPUT fi - name: "[DEBUG] Workflow Inputs" @@ -139,48 +139,63 @@ jobs: if: needs.configure.outputs.has_refs != 0 - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 + + # https://github.com/alpinelinux/docker-alpine/issues/98 + - name: "[SETUP] Fix Docker IP forwarding" + run: | + sysctl net.ipv4.ip_forward + sudo sysctl -w net.ipv4.ip_forward=1 + sudo systemctl restart docker # ------------------------------------------------------------ # Build # ------------------------------------------------------------ + - name: Pull Base + uses: cytopia/shell-command-retry-action@v0.1.6 + with: + command: | + make docker-pull-base-image NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" ARCH=${{ matrix.arch }} + - name: Build - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: + retries: 10 + pause: 5 command: | - make build NAME=${{ matrix.name }} VERSION=${{ matrix.version }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make build NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} # ------------------------------------------------------------ # Test # ------------------------------------------------------------ - name: Test - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make test NAME=${{ matrix.name }} VERSION=${{ matrix.version }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make test NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} # ------------------------------------------------------------ # Deploy # ------------------------------------------------------------ - name: Docker login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.dockerhub_username }} password: ${{ secrets.dockerhub_password }} if: needs.configure.outputs.can_login == 1 && inputs.can_deploy - name: Docker push architecture image - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make push NAME=${{ matrix.name }} VERSION=${{ matrix.version }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make push NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} if: needs.configure.outputs.can_login == 1 && inputs.can_deploy # ----------------------------------------------------------------------------------------------- @@ -214,7 +229,7 @@ jobs: - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 - name: "[SETUP] Determine manifest arches" id: manifest @@ -225,7 +240,7 @@ jobs: | jq '.[] | select(.NAME=="${{ matrix.name }}" and .VERSION=="${{ matrix.version }}") | .ARCHES' \ | jq -c -M \ )" - echo "::set-output name=arches::${ARCHES}" + echo "arches=${ARCHES}" >> $GITHUB_OUTPUT echo "ARCHES: ${ARCHES}" @@ -233,19 +248,19 @@ jobs: # Deploy # ------------------------------------------------------------ - name: "[DEPLOY] Login" - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: "[DEPLOY] Create Docker manifest for architectures: ${{ steps.manifest.outputs.arches }}" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-create NAME=${{ matrix.name }} VERSION=${{ matrix.version }} ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-create NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} - name: "[DEPLOY] Publish Docker manifest: ${{ steps.tag.outputs.docker-tag }}" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-push NAME=${{ matrix.name }} VERSION=${{ matrix.version }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-push NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" TAG=${{ steps.tag.outputs.docker-tag }} diff --git a/.github/workflows/docker-name-version-flavour-arch.yml b/.github/workflows/docker-name-version-flavour-arch.yml index 138e4a1..727cc58 100644 --- a/.github/workflows/docker-name-version-flavour-arch.yml +++ b/.github/workflows/docker-name-version-flavour-arch.yml @@ -53,9 +53,9 @@ jobs: shell: bash run: | if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then - echo "::set-output name=can_login::0" + echo "can_login=0" >> $GITHUB_OUTPUT else - echo "::set-output name=can_login::1" + echo "can_login=1" >> $GITHUB_OUTPUT fi env: ENV_USER: ${{ secrets.dockerhub_username }} @@ -76,9 +76,9 @@ jobs: --argjson refs '${{ inputs.refs }}' \ 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \ )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::1" + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT + echo "has_refs=1" >> $GITHUB_OUTPUT else MATRIX_BUILD="$( \ jq -M -c \ @@ -88,9 +88,9 @@ jobs: jq -M -c \ 'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[]})' <<<'${{ inputs.matrix }}' \ )" - echo "::set-output name=matrix_build::${MATRIX_BUILD}" - echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}" - echo "::set-output name=has_refs::0" + echo "matrix_build=${MATRIX_BUILD}" >> $GITHUB_OUTPUT + echo "matrix_deploy=${MATRIX_DEPLOY}" >> $GITHUB_OUTPUT + echo "has_refs=0" >> $GITHUB_OUTPUT fi - name: "[DEBUG] Workflow Inputs" @@ -139,48 +139,63 @@ jobs: if: needs.configure.outputs.has_refs != 0 - name: "[SETUP] Setup QEMU environment" - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: image: tonistiigi/binfmt:latest platforms: all - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 + + # https://github.com/alpinelinux/docker-alpine/issues/98 + - name: "[SETUP] Fix Docker IP forwarding" + run: | + sysctl net.ipv4.ip_forward + sudo sysctl -w net.ipv4.ip_forward=1 + sudo systemctl restart docker # ------------------------------------------------------------ # Build # ------------------------------------------------------------ + - name: Pull Base + uses: cytopia/shell-command-retry-action@v0.1.6 + with: + command: | + make docker-pull-base-image VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} + - name: Build - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: + retries: 10 + pause: 5 command: | - make build NAME=${{ matrix.name }} VERSION=${{ matrix.version }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make build NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} # ------------------------------------------------------------ # Test # ------------------------------------------------------------ - name: Test - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make test NAME=${{ matrix.name }} VERSION=${{ matrix.version }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make test NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} # ------------------------------------------------------------ # Deploy # ------------------------------------------------------------ - name: Docker login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.dockerhub_username }} password: ${{ secrets.dockerhub_password }} if: needs.configure.outputs.can_login == 1 && inputs.can_deploy - name: Docker push architecture image - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make push NAME=${{ matrix.name }} VERSION=${{ matrix.version }} FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} + make push NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} ARCH=${{ matrix.arch }} TAG=${{ steps.tag.outputs.docker-tag }} if: needs.configure.outputs.can_login == 1 && inputs.can_deploy # ----------------------------------------------------------------------------------------------- @@ -214,7 +229,7 @@ jobs: - name: "[SETUP] Determine Docker tag" id: tag - uses: cytopia/docker-tag-action@v0.4.15 + uses: cytopia/docker-tag-action@v0.4.22 - name: "[SETUP] Determine manifest arches" id: manifest @@ -225,7 +240,7 @@ jobs: | jq '.[] | select(.NAME=="${{ matrix.name }}" and .VERSION=="${{ matrix.version }}" and .FLAVOUR=="${{ matrix.flavour }}") | .ARCHES' \ | jq -c -M \ )" - echo "::set-output name=arches::${ARCHES}" + echo "arches=${ARCHES}" >> $GITHUB_OUTPUT echo "ARCHES: ${ARCHES}" @@ -233,19 +248,19 @@ jobs: # Deploy # ------------------------------------------------------------ - name: "[DEPLOY] Login" - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: "[DEPLOY] Create Docker manifest for architectures: ${{ steps.manifest.outputs.arches }}" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-create NAME=${{ matrix.name }} VERSION=${{ matrix.version }} FLAVOUR=${{ matrix.flavour }} ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-create NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }} - name: "[DEPLOY] Publish Docker manifest: ${{ steps.tag.outputs.docker-tag }}" - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | - make manifest-push NAME=${{ matrix.name }} VERSION=${{ matrix.version }} FLAVOUR=${{ matrix.flavour }} TAG=${{ steps.tag.outputs.docker-tag }} + make manifest-push NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" FLAVOUR=${{ matrix.flavour }} TAG=${{ steps.tag.outputs.docker-tag }} diff --git a/.github/workflows/lint-generic.yml b/.github/workflows/lint-generic.yml index 217e9e6..344a3b7 100644 --- a/.github/workflows/lint-generic.yml +++ b/.github/workflows/lint-generic.yml @@ -19,25 +19,25 @@ jobs: fetch-depth: 0 - name: Lint Files - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make lint-files - name: Lint Yaml - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make lint-yaml - name: Lint JSON - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make lint-json - name: Lint Bash - uses: cytopia/shell-command-retry-action@v0.1.3 + uses: cytopia/shell-command-retry-action@v0.1.6 with: command: | make lint-bash