Bumps the actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/download-artifact](https://github.com/actions/download-artifact) and [erlef/setup-beam](https://github.com/erlef/setup-beam).
Updates `actions/checkout` from 4.1.2 to 4.1.7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.2...692973e3d937129bcbf40652eb9f2f61becf3332)
Updates `actions/download-artifact` from 4.1.4 to 4.1.7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.4...65a9edc5881444af0b9093a5e628f2fe47ea3b2e)
Updates `erlef/setup-beam` from 1.17.6 to 1.18.0
- [Release notes](https://github.com/erlef/setup-beam/releases)
- [Commits](0a541161e4...a6e26b2231)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: actions
- dependency-name: erlef/setup-beam
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
name: Build docker image for test
|
|
|
|
concurrency:
|
|
group: docker-test-build-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }}
|
|
env:
|
|
EMQX_NAME: ${{ matrix.profile }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
profile:
|
|
- emqx
|
|
- emqx-enterprise
|
|
- emqx-elixir
|
|
- emqx-enterprise-elixir
|
|
|
|
steps:
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
- name: Set up environment
|
|
id: env
|
|
run: |
|
|
source env.sh
|
|
PKG_VSN=$(docker run --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u) "$EMQX_BUILDER" ./pkg-vsn.sh "$EMQX_NAME")
|
|
echo "PKG_VSN=$PKG_VSN" >> "$GITHUB_ENV"
|
|
- name: build and export to Docker
|
|
id: build
|
|
run: |
|
|
make ${EMQX_NAME}-docker
|
|
echo "_EMQX_DOCKER_IMAGE_TAG=$(head -n 1 .emqx_docker_image_tags)" >> $GITHUB_ENV
|
|
- name: smoke test
|
|
run: |
|
|
CID=$(docker run -d --rm -P $_EMQX_DOCKER_IMAGE_TAG)
|
|
HTTP_PORT=$(docker inspect --format='{{(index (index .NetworkSettings.Ports "18083/tcp") 0).HostPort}}' $CID)
|
|
./scripts/test/emqx-smoke-test.sh localhost $HTTP_PORT || {
|
|
docker logs $CID
|
|
exit 1
|
|
}
|
|
docker stop $CID
|
|
- name: export docker image
|
|
if: always()
|
|
run: |
|
|
docker save $_EMQX_DOCKER_IMAGE_TAG | gzip > $EMQX_NAME-docker-$PKG_VSN.tar.gz
|
|
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
with:
|
|
name: "${{ env.EMQX_NAME }}-docker"
|
|
path: "${{ env.EMQX_NAME }}-docker-${{ env.PKG_VSN }}.tar.gz"
|
|
retention-days: 3
|