Skip to content

Commit 95bf10c

Browse files
committed
ci: download docker images
1 parent a92d4b1 commit 95bf10c

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/update-api-and-cfg-manual.yaml

+27-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ jobs:
4545
github-token: ${{ secrets.PAT_RO_WORKFLOWS }}
4646
merge-multiple: true
4747

48+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
49+
with:
50+
name: "emqx-docker"
51+
repository: ${{ env.REPOSITORY }}
52+
run-id: ${{ env.RUN_ID }}
53+
github-token: ${{ secrets.PAT_RO_WORKFLOWS }}
54+
55+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
56+
with:
57+
name: "emqx-enterprise-docker"
58+
repository: ${{ env.REPOSITORY }}
59+
run-id: ${{ env.RUN_ID }}
60+
github-token: ${{ secrets.PAT_RO_WORKFLOWS }}
61+
4862
- name: Create PR to update api docs and config manual
4963
env:
5064
GH_TOKEN: ${{ github.token }}
@@ -64,11 +78,22 @@ jobs:
6478
sed -i "s/EE_VERSION=.*/EE_VERSION=${VERSION}/" ./current-version.env
6579
sed -i "s/EE_MINOR_VERSION=.*/EE_MINOR_VERSION=${MINOR_VERSION}/" ./current-version.env
6680
git add current-version.env
81+
EMQX_TAG=$(docker load < emqx-docker-*.tar.gz | sed 's/Loaded image: //g')
82+
EMQX_ENTERPRISE_TAG=$(docker load < emqx-enterprise-docker-*.tar.gz | sed 's/Loaded image: //g')
6783
6884
for edition in ce ee; do
69-
PROFILE=$(echo "${edition}" | sed 's/ce/emqx/g' | sed 's/ee/emqx-enterprise/g')
85+
case "${edition}" in
86+
ce)
87+
PROFILE=emqx
88+
DOCKER_IMAGE=${EMQX_TAG}
89+
;;
90+
ee)
91+
PROFILE=emqx-enterprise
92+
DOCKER_IMAGE=${EMQX_ENTERPRISE_TAG}
93+
;;
94+
esac
7095
for lang in en zh; do
71-
docker run -d --name emqx -p 18083:18083 -e EMQX_dashboard__i18n_lang=${lang} "emqx/${PROFILE}:${EMQX_VERSION}"
96+
docker run -d --name emqx -p 18083:18083 -e EMQX_dashboard__i18n_lang=${lang} "${DOCKER_IMAGE}"
7297
curl -fsS -m 10 --retry 10 --retry-all-errors -o /dev/null http://localhost:18083/api-docs/swagger.json
7398
./rewrite-swagger.sh ${edition} ${lang}
7499
docker logs emqx

0 commit comments

Comments
 (0)