|
@@ -46,7 +46,6 @@ jobs:
|
|
|
else
|
|
else
|
|
|
docker_latest=false
|
|
docker_latest=false
|
|
|
fi
|
|
fi
|
|
|
- echo "::set-output name=IS_DOCKER_LATEST::${docker_latest}"
|
|
|
|
|
if git describe --tags --match "[v|e]*" --exact; then
|
|
if git describe --tags --match "[v|e]*" --exact; then
|
|
|
echo "This is an exact git tag, will publish images"
|
|
echo "This is an exact git tag, will publish images"
|
|
|
is_exact='true'
|
|
is_exact='true'
|
|
@@ -54,7 +53,6 @@ jobs:
|
|
|
echo "This is NOT an exact git tag, will not publish images"
|
|
echo "This is NOT an exact git tag, will not publish images"
|
|
|
is_exact='false'
|
|
is_exact='false'
|
|
|
fi
|
|
fi
|
|
|
- echo "::set-output name=IS_EXACT_TAG::${is_exact}"
|
|
|
|
|
case $tag in
|
|
case $tag in
|
|
|
refs/tags/v*)
|
|
refs/tags/v*)
|
|
|
PROFILE='emqx'
|
|
PROFILE='emqx'
|
|
@@ -78,10 +76,12 @@ jobs:
|
|
|
esac
|
|
esac
|
|
|
;;
|
|
;;
|
|
|
esac
|
|
esac
|
|
|
- echo "::set-output name=BUILD_PROFILE::$PROFILE"
|
|
|
|
|
VSN="$(./pkg-vsn.sh "$PROFILE")"
|
|
VSN="$(./pkg-vsn.sh "$PROFILE")"
|
|
|
echo "Building $PROFILE image with tag $VSN (latest=$docker_latest)"
|
|
echo "Building $PROFILE image with tag $VSN (latest=$docker_latest)"
|
|
|
- echo "::set-output name=DOCKER_TAG_VERSION::$VSN"
|
|
|
|
|
|
|
+ echo "IS_DOCKER_LATEST=$docker_latest" >> $GITHUB_OUTPUT
|
|
|
|
|
+ echo "IS_EXACT_TAG=$is_exact" >> $GITHUB_OUTPUT
|
|
|
|
|
+ echo "BUILD_PROFILE=$PROFILE" >> $GITHUB_OUTPUT
|
|
|
|
|
+ echo "DOCKER_TAG_VERSION=$VSN" >> $GITHUB_OUTPUT
|
|
|
- name: get_all_deps
|
|
- name: get_all_deps
|
|
|
run: |
|
|
run: |
|
|
|
make -C source deps-all
|
|
make -C source deps-all
|
|
@@ -92,60 +92,33 @@ jobs:
|
|
|
path: source.zip
|
|
path: source.zip
|
|
|
|
|
|
|
|
docker:
|
|
docker:
|
|
|
- runs-on: ${{ matrix.build_machine }}
|
|
|
|
|
|
|
+ runs-on: ${{ matrix.arch[1] }}
|
|
|
needs: prepare
|
|
needs: prepare
|
|
|
|
|
|
|
|
strategy:
|
|
strategy:
|
|
|
fail-fast: false
|
|
fail-fast: false
|
|
|
matrix:
|
|
matrix:
|
|
|
arch:
|
|
arch:
|
|
|
- - amd64
|
|
|
|
|
- - arm64
|
|
|
|
|
|
|
+ - [amd64, ubuntu-20.04]
|
|
|
|
|
+ - [arm64, aws-arm64]
|
|
|
profile:
|
|
profile:
|
|
|
- ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
- ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
|
- build_elixir:
|
|
|
|
|
- - no_elixir
|
|
|
|
|
registry:
|
|
registry:
|
|
|
- 'docker.io'
|
|
- 'docker.io'
|
|
|
- 'public.ecr.aws'
|
|
- 'public.ecr.aws'
|
|
|
os:
|
|
os:
|
|
|
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
|
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
- # NOTE: for docker, only support latest otp and elixir
|
|
|
|
|
- # versions, not a matrix
|
|
|
|
|
|
|
+ # NOTE: 'otp' and 'elixir' are to configure emqx-builder image
|
|
|
|
|
+ # only support latest otp and elixir, not a matrix
|
|
|
otp:
|
|
otp:
|
|
|
- 24.2.1-1 # update to latest
|
|
- 24.2.1-1 # update to latest
|
|
|
elixir:
|
|
elixir:
|
|
|
- 1.13.4 # update to latest
|
|
- 1.13.4 # update to latest
|
|
|
- build_machine:
|
|
|
|
|
- - aws-arm64
|
|
|
|
|
- - ubuntu-20.04
|
|
|
|
|
- exclude:
|
|
|
|
|
- - arch: arm64
|
|
|
|
|
- build_machine: ubuntu-20.04
|
|
|
|
|
- - arch: amd64
|
|
|
|
|
- build_machine: aws-arm64
|
|
|
|
|
- include:
|
|
|
|
|
- - arch: amd64
|
|
|
|
|
- profile: emqx
|
|
|
|
|
- build_elixir: with_elixir
|
|
|
|
|
- registry: 'docker.io'
|
|
|
|
|
- os: [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
|
|
- otp: 24.2.1-1
|
|
|
|
|
- elixir: 1.13.4
|
|
|
|
|
- build_machine: ubuntu-20.04
|
|
|
|
|
- - arch: arm64
|
|
|
|
|
- profile: emqx
|
|
|
|
|
- build_elixir: with_elixir
|
|
|
|
|
- registry: 'docker.io'
|
|
|
|
|
- os: [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
|
|
- otp: 24.2.1-1
|
|
|
|
|
- elixir: 1.13.4
|
|
|
|
|
- build_machine: aws-arm64
|
|
|
|
|
|
|
|
|
|
steps:
|
|
steps:
|
|
|
- uses: AutoModality/action-clean@v1
|
|
- uses: AutoModality/action-clean@v1
|
|
|
- if: matrix.build_machine == 'aws-arm64'
|
|
|
|
|
|
|
+ if: matrix.arch[1] == 'aws-arm64'
|
|
|
- uses: actions/download-artifact@v3
|
|
- uses: actions/download-artifact@v3
|
|
|
with:
|
|
with:
|
|
|
name: source
|
|
name: source
|
|
@@ -171,108 +144,123 @@ jobs:
|
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
ecr: true
|
|
ecr: true
|
|
|
|
|
|
|
|
- - name: prepare for docker-action-parms
|
|
|
|
|
- id: pre-meta
|
|
|
|
|
- run: |
|
|
|
|
|
- emqx_name=${{ matrix.profile }}
|
|
|
|
|
- img_suffix=${{ matrix.arch }}
|
|
|
|
|
- img_labels="org.opencontainers.image.otp.version=${{ matrix.otp }}"
|
|
|
|
|
-
|
|
|
|
|
- if [ ${{ matrix.build_elixir }} = "with_elixir" ]; then
|
|
|
|
|
- emqx_name="emqx-elixir"
|
|
|
|
|
- img_suffix="elixir-${{ matrix.arch }}"
|
|
|
|
|
- img_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}\n${img_labels}"
|
|
|
|
|
- fi
|
|
|
|
|
-
|
|
|
|
|
- if [ ${{ matrix.profile }} = "emqx" ]; then
|
|
|
|
|
- img_labels="org.opencontainers.image.edition=Opensource\n${img_labels}"
|
|
|
|
|
- fi
|
|
|
|
|
-
|
|
|
|
|
- if [ ${{ matrix.profile }} = "emqx-enterprise" ]; then
|
|
|
|
|
- img_labels="org.opencontainers.image.edition=Enterprise\n${img_labels}"
|
|
|
|
|
- fi
|
|
|
|
|
-
|
|
|
|
|
- if [[ ${{ matrix.os[0] }} =~ "alpine" ]]; then
|
|
|
|
|
- img_suffix="${img_suffix}-alpine"
|
|
|
|
|
- fi
|
|
|
|
|
-
|
|
|
|
|
- echo "::set-output name=emqx_name::${emqx_name}"
|
|
|
|
|
- echo "::set-output name=img_suffix::${img_suffix}"
|
|
|
|
|
- echo "::set-output name=img_labels::${img_labels}"
|
|
|
|
|
-
|
|
|
|
|
- # NOTE, Pls make sure this is identical as the one in job 'docker-push-multi-arch-manifest'
|
|
|
|
|
- - uses: docker/metadata-action@v4
|
|
|
|
|
|
|
+ - uses: ./source/.github/actions/docker-meta
|
|
|
id: meta
|
|
id: meta
|
|
|
with:
|
|
with:
|
|
|
- images: ${{ matrix.registry }}/${{ github.repository_owner }}/${{ matrix.profile }}
|
|
|
|
|
- flavor: |
|
|
|
|
|
- suffix=-${{ steps.pre-meta.outputs.img_suffix }}
|
|
|
|
|
- tags: |
|
|
|
|
|
- type=raw,value=${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
- labels:
|
|
|
|
|
- ${{ steps.pre-meta.outputs.img_labels }}
|
|
|
|
|
|
|
+ profile: ${{ matrix.profile }}
|
|
|
|
|
+ registry: ${{ matrix.registry }}
|
|
|
|
|
+ arch: ${{ matrix.arch[0] }}
|
|
|
|
|
+ otp: ${{ matrix.otp }}
|
|
|
|
|
+ builder_base: ${{ matrix.os[0] }}
|
|
|
|
|
+ owner: ${{ github.repository_owner }}
|
|
|
|
|
+ docker_tags: ${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
|
|
|
- uses: docker/build-push-action@v3
|
|
- uses: docker/build-push-action@v3
|
|
|
with:
|
|
with:
|
|
|
push: ${{ needs.prepare.outputs.IS_EXACT_TAG }}
|
|
push: ${{ needs.prepare.outputs.IS_EXACT_TAG }}
|
|
|
pull: true
|
|
pull: true
|
|
|
no-cache: true
|
|
no-cache: true
|
|
|
- platforms: linux/${{ matrix.arch }}
|
|
|
|
|
|
|
+ platforms: linux/${{ matrix.arch[0] }}
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
build-args: |
|
|
build-args: |
|
|
|
BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-17:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
|
|
BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-17:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
|
|
|
RUN_FROM=${{ matrix.os[1] }}
|
|
RUN_FROM=${{ matrix.os[1] }}
|
|
|
- EMQX_NAME=${{ steps.pre-meta.outputs.emqx_name }}
|
|
|
|
|
|
|
+ EMQX_NAME=${{ steps.meta.outputs.emqx_name }}
|
|
|
|
|
+ file: source/${{ matrix.os[2] }}
|
|
|
|
|
+ context: source
|
|
|
|
|
+
|
|
|
|
|
+ docker-elixir:
|
|
|
|
|
+ runs-on: ${{ matrix.arch[1] }}
|
|
|
|
|
+ needs: prepare
|
|
|
|
|
+ # do not build elixir images for ee for now
|
|
|
|
|
+ if: needs.prepare.outputs.BUILD_PROFILE == 'emqx'
|
|
|
|
|
+
|
|
|
|
|
+ strategy:
|
|
|
|
|
+ fail-fast: false
|
|
|
|
|
+ matrix:
|
|
|
|
|
+ arch:
|
|
|
|
|
+ - [amd64, ubuntu-20.04]
|
|
|
|
|
+ - [arm64, aws-arm64]
|
|
|
|
|
+ profile:
|
|
|
|
|
+ - ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
|
|
|
+ registry:
|
|
|
|
|
+ - 'docker.io'
|
|
|
|
|
+ os:
|
|
|
|
|
+ - [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
|
|
+ otp:
|
|
|
|
|
+ - 24.2.1-1 # update to latest
|
|
|
|
|
+ elixir:
|
|
|
|
|
+ - 1.13.4 # update to latest
|
|
|
|
|
+
|
|
|
|
|
+ steps:
|
|
|
|
|
+ - uses: AutoModality/action-clean@v1
|
|
|
|
|
+ if: matrix.arch[1] == 'aws-arm64'
|
|
|
|
|
+ - uses: actions/download-artifact@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ name: source
|
|
|
|
|
+ path: .
|
|
|
|
|
+ - name: unzip source code
|
|
|
|
|
+ run: unzip -q source.zip
|
|
|
|
|
+
|
|
|
|
|
+ - uses: docker/setup-buildx-action@v2
|
|
|
|
|
+
|
|
|
|
|
+ - name: Login for docker.
|
|
|
|
|
+ uses: docker/login-action@v2
|
|
|
|
|
+ with:
|
|
|
|
|
+ username: ${{ secrets.DOCKER_HUB_USER }}
|
|
|
|
|
+ password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
|
+
|
|
|
|
|
+ - uses: ./source/.github/actions/docker-meta
|
|
|
|
|
+ id: meta
|
|
|
|
|
+ with:
|
|
|
|
|
+ profile: ${{ matrix.profile }}
|
|
|
|
|
+ registry: ${{ matrix.registry }}
|
|
|
|
|
+ arch: ${{ matrix.arch[0] }}
|
|
|
|
|
+ otp: ${{ matrix.otp }}
|
|
|
|
|
+ elixir: ${{ matrix.elixir }}
|
|
|
|
|
+ builder_base: ${{ matrix.os[0] }}
|
|
|
|
|
+ owner: ${{ github.repository_owner }}
|
|
|
|
|
+ docker_tags: ${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
+
|
|
|
|
|
+ - uses: docker/build-push-action@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ push: ${{ needs.prepare.outputs.IS_EXACT_TAG }}
|
|
|
|
|
+ pull: true
|
|
|
|
|
+ no-cache: true
|
|
|
|
|
+ platforms: linux/${{ matrix.arch[0] }}
|
|
|
|
|
+ tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
+ labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
+ build-args: |
|
|
|
|
|
+ BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-17:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os[0] }}
|
|
|
|
|
+ RUN_FROM=${{ matrix.os[1] }}
|
|
|
|
|
+ EMQX_NAME=${{ steps.meta.outputs.emqx_name }}
|
|
|
file: source/${{ matrix.os[2] }}
|
|
file: source/${{ matrix.os[2] }}
|
|
|
context: source
|
|
context: source
|
|
|
|
|
|
|
|
docker-push-multi-arch-manifest:
|
|
docker-push-multi-arch-manifest:
|
|
|
# note, we only run on amd64
|
|
# note, we only run on amd64
|
|
|
- if: ${{ needs.prepare.outputs.IS_EXACT_TAG }}
|
|
|
|
|
|
|
+ if: needs.prepare.outputs.IS_EXACT_TAG
|
|
|
needs:
|
|
needs:
|
|
|
- prepare
|
|
- prepare
|
|
|
- docker
|
|
- docker
|
|
|
- runs-on: ubuntu-latest
|
|
|
|
|
|
|
+ runs-on: ${{ matrix.arch[1] }}
|
|
|
strategy:
|
|
strategy:
|
|
|
fail-fast: false
|
|
fail-fast: false
|
|
|
matrix:
|
|
matrix:
|
|
|
|
|
+ arch:
|
|
|
|
|
+ - [amd64, ubuntu-20.04]
|
|
|
profile:
|
|
profile:
|
|
|
- ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
- ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
|
- build_elixir:
|
|
|
|
|
- - no_elixir
|
|
|
|
|
os:
|
|
os:
|
|
|
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
|
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
- # NOTE: for docker, only support latest otp version, not a matrix
|
|
|
|
|
|
|
+ # NOTE: only support latest otp version, not a matrix
|
|
|
otp:
|
|
otp:
|
|
|
- 24.2.1-1 # update to latest
|
|
- 24.2.1-1 # update to latest
|
|
|
- #
|
|
|
|
|
- elixir:
|
|
|
|
|
- - 1.13.4 # update to latest
|
|
|
|
|
- arch:
|
|
|
|
|
- - amd64
|
|
|
|
|
- #- arm64
|
|
|
|
|
- build_machine:
|
|
|
|
|
- - aws-arm64
|
|
|
|
|
- - ubuntu-20.04
|
|
|
|
|
registry:
|
|
registry:
|
|
|
- 'docker.io'
|
|
- 'docker.io'
|
|
|
- 'public.ecr.aws'
|
|
- 'public.ecr.aws'
|
|
|
- exclude:
|
|
|
|
|
- - arch: arm64
|
|
|
|
|
- build_machine: ubuntu-20.04
|
|
|
|
|
- - arch: amd64
|
|
|
|
|
- build_machine: aws-arm64
|
|
|
|
|
- include:
|
|
|
|
|
- - arch: amd64
|
|
|
|
|
- profile: emqx
|
|
|
|
|
- build_elixir: with_elixir
|
|
|
|
|
- os: [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
|
|
|
|
- otp: 24.2.1-1
|
|
|
|
|
- elixir: 1.13.4
|
|
|
|
|
- build_machine: ubuntu-20.04
|
|
|
|
|
- registry: docker.io
|
|
|
|
|
|
|
|
|
|
steps:
|
|
steps:
|
|
|
- uses: actions/download-artifact@v3
|
|
- uses: actions/download-artifact@v3
|
|
@@ -297,54 +285,73 @@ jobs:
|
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
ecr: true
|
|
ecr: true
|
|
|
|
|
|
|
|
- - name: prepare for docker-action-parms
|
|
|
|
|
- id: pre-meta
|
|
|
|
|
|
|
+ - uses: ./source/.github/actions/docker-meta
|
|
|
|
|
+ id: meta
|
|
|
|
|
+ with:
|
|
|
|
|
+ profile: ${{ matrix.profile }}
|
|
|
|
|
+ registry: ${{ matrix.registry }}
|
|
|
|
|
+ arch: ${{ matrix.arch[0] }}
|
|
|
|
|
+ otp: ${{ matrix.otp }}
|
|
|
|
|
+ builder_base: ${{ matrix.os[0] }}
|
|
|
|
|
+ owner: ${{ github.repository_owner }}
|
|
|
|
|
+ docker_tags: ${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
+
|
|
|
|
|
+ - name: update manifest for multiarch image
|
|
|
|
|
+ working-directory: source
|
|
|
run: |
|
|
run: |
|
|
|
- emqx_name=${{ matrix.profile }}
|
|
|
|
|
- img_suffix=${{ matrix.arch }}
|
|
|
|
|
- img_labels="org.opencontainers.image.otp.version=${{ matrix.otp }}"
|
|
|
|
|
-
|
|
|
|
|
- if [ ${{ matrix.build_elixir }} = 'with_elixir' ]; then
|
|
|
|
|
- emqx_name="emqx-elixir"
|
|
|
|
|
- img_suffix="elixir-${{ matrix.arch }}"
|
|
|
|
|
- img_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}\n$img_labels"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ is_latest="${{ needs.prepare.outputs.IS_DOCKER_LATEST }}"
|
|
|
|
|
+ scripts/docker-create-push-manifests.sh "${{ steps.meta.outputs.tags }}" "$is_latest"
|
|
|
|
|
|
|
|
- if [ ${{ matrix.profile }} = "emqx" ]; then
|
|
|
|
|
- img_labels="org.opencontainers.image.edition=Opensource\n${img_labels}"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ docker-elixir-push-multi-arch-manifest:
|
|
|
|
|
+ # note, we only run on amd64
|
|
|
|
|
+ # do not build enterprise elixir images for now
|
|
|
|
|
+ if: needs.prepare.outputs.IS_EXACT_TAG && needs.prepare.outputs.BUILD_PROFILE == 'emqx'
|
|
|
|
|
+ needs:
|
|
|
|
|
+ - prepare
|
|
|
|
|
+ - docker-elixir
|
|
|
|
|
+ runs-on: ${{ matrix.arch[1] }}
|
|
|
|
|
+ strategy:
|
|
|
|
|
+ fail-fast: false
|
|
|
|
|
+ matrix:
|
|
|
|
|
+ arch:
|
|
|
|
|
+ - [amd64, ubuntu-20.04]
|
|
|
|
|
+ profile:
|
|
|
|
|
+ - ${{ needs.prepare.outputs.BUILD_PROFILE }}
|
|
|
|
|
+ # NOTE: for docker, only support latest otp version, not a matrix
|
|
|
|
|
+ otp:
|
|
|
|
|
+ - 24.2.1-1 # update to latest
|
|
|
|
|
+ elixir:
|
|
|
|
|
+ - 1.13.4 # update to latest
|
|
|
|
|
+ registry:
|
|
|
|
|
+ - 'docker.io'
|
|
|
|
|
|
|
|
- if [ ${{ matrix.profile }} = "emqx-enterprise" ]; then
|
|
|
|
|
- img_labels="org.opencontainers.image.edition=Enterprise\n${img_labels}"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ steps:
|
|
|
|
|
+ - uses: actions/download-artifact@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ name: source
|
|
|
|
|
+ path: .
|
|
|
|
|
|
|
|
- if [[ ${{ matrix.os[0] }} =~ "alpine" ]]; then
|
|
|
|
|
- img_suffix="${img_suffix}-alpine"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ - name: unzip source code
|
|
|
|
|
+ run: unzip -q source.zip
|
|
|
|
|
|
|
|
- echo "::set-output name=emqx_name::${emqx_name}"
|
|
|
|
|
- echo "::set-output name=img_suffix::${img_suffix}"
|
|
|
|
|
- echo "::set-output name=img_labels::${img_labels}"
|
|
|
|
|
|
|
+ - uses: docker/login-action@v2
|
|
|
|
|
+ with:
|
|
|
|
|
+ username: ${{ secrets.DOCKER_HUB_USER }}
|
|
|
|
|
+ password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
|
|
|
|
- # NOTE, Pls make sure this is identical as the one in job 'docker'
|
|
|
|
|
- - uses: docker/metadata-action@v4
|
|
|
|
|
|
|
+ - uses: ./source/.github/actions/docker-meta
|
|
|
id: meta
|
|
id: meta
|
|
|
with:
|
|
with:
|
|
|
- images: ${{ matrix.registry }}/${{ github.repository_owner }}/${{ matrix.profile }}
|
|
|
|
|
- flavor: |
|
|
|
|
|
- suffix=-${{ steps.pre-meta.outputs.img_suffix }}
|
|
|
|
|
- tags: |
|
|
|
|
|
- type=raw,value=${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
- labels:
|
|
|
|
|
- ${{ steps.pre-meta.outputs.img_labels }}
|
|
|
|
|
|
|
+ profile: ${{ matrix.profile }}
|
|
|
|
|
+ registry: ${{ matrix.registry }}
|
|
|
|
|
+ arch: ${{ matrix.arch[0] }}
|
|
|
|
|
+ otp: ${{ matrix.otp }}
|
|
|
|
|
+ elixir: ${{ matrix.elixir }}
|
|
|
|
|
+ builder_base: ${{ matrix.os[0] }}
|
|
|
|
|
+ owner: ${{ github.repository_owner }}
|
|
|
|
|
+ docker_tags: ${{ needs.prepare.outputs.DOCKER_TAG_VERSION }}
|
|
|
|
|
|
|
|
- name: update manifest for multiarch image
|
|
- name: update manifest for multiarch image
|
|
|
- if: ${{ needs.prepare.outputs.IS_EXACT_TAG }}
|
|
|
|
|
working-directory: source
|
|
working-directory: source
|
|
|
run: |
|
|
run: |
|
|
|
- if [ ${{ matrix.build_elixir }} = 'with_elixir' ]; then
|
|
|
|
|
- is_latest=false
|
|
|
|
|
- else
|
|
|
|
|
- is_latest="${{ needs.prepare.outputs.IS_DOCKER_LATEST }}"
|
|
|
|
|
- fi
|
|
|
|
|
- scripts/docker-create-push-manifests.sh "${{ steps.meta.outputs.tags }}" "$is_latest"
|
|
|
|
|
|
|
+ scripts/docker-create-push-manifests.sh "${{ steps.meta.outputs.tags }}" false
|