Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations #71

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions .github/workflows/docker-name-version-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 \
Expand All @@ -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"
Expand Down Expand Up @@ -148,14 +148,29 @@ jobs:
id: tag
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 }}" ARCH=${{ matrix.arch }}

- name: Build
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
Expand All @@ -164,7 +179,7 @@ jobs:
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
Expand All @@ -180,7 +195,7 @@ jobs:
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

# -----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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}"


Expand All @@ -242,10 +257,10 @@ jobs:
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.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 }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-name-version-flavour-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
retries: 10
pause: 5
command: |
make rebuild 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
Expand Down