Fixed bicep build and manifest creation in the release job (#2108)

* Fix bicep build.
* Fix manifest creation.
This commit is contained in:
Ophélie Le Mentec 2023-11-01 09:37:39 +01:00 коммит произвёл GitHub
Родитель 1020e5a24c
Коммит c32ecd8754
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 30 добавлений и 6 удалений

36
.github/workflows/create_release.yaml поставляемый
Просмотреть файл

@ -34,12 +34,34 @@ jobs:
run: |
docker buildx build -f "./LoRaEngine/modules/LoRaWanNetworkSrvModule/Dockerfile.${{ matrix.image }}" -t $DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION-${{ matrix.image }} --output type=image,push=true "."
docker buildx build -f "./LoRaEngine/modules/LoRaBasicsStationModule/Dockerfile.${{ matrix.image }}" -t $DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION-${{ matrix.image }} --build-arg CONTAINER_REGISTRY_ADDRESS=docker.io --output type=image,push=true "."
env:
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKER_REPOSITORY }}
CreateManifests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Login to docker hub
run: |
docker login -u ${{ secrets.DOCKER_LOGIN }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Create manifests
run: |
docker manifest create $DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION $DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION-${{ matrix.image }} --amend
docker manifest create $DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION $DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION-${{ matrix.image }} --amend
docker manifest push $DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION
docker manifest push $DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION
docker buildx imagetools create -t $DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION \
$DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION-amd64 \
$DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION-arm32v7 \
$DOCKERHUB_ORGANISATION/lorawannetworksrvmodule:$VERSION-arm64v8
docker buildx imagetools create -t $DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION \
$DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION-amd64 \
$DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION-arm32v7 \
$DOCKERHUB_ORGANISATION/lorabasicsstationmodule:$VERSION-arm64v8
needs:
[BuildAndPushDockerImages]
env:
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKER_REPOSITORY }}
@ -84,7 +106,9 @@ jobs:
run: |
sed -r -i "s/param version string = '[0-9/.]+'/param version string = '${VERSION}'/g" TemplateBicep/main.bicep
- name: Generate ARM file
run: az bicep build --file TemplateBicep/main.bicep --outfile $ARM_FILE
run: |
mkdir Template
az bicep build --file TemplateBicep/main.bicep --outfile $ARM_FILE
- name: Set up git user using the built-in token
run: |
git config user.name github-actions
@ -149,4 +173,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs:
[BuildAndPushDockerImages, CreatePRToUpdateDoc, CreatePRToUpdateBicep]
[BuildAndPushDockerImages, CreateManifests, CreatePRToUpdateDoc, CreatePRToUpdateBicep]