Set VERSION to v1.13.3 #96
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push a release image | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
get-version: | |
runs-on: [ubuntu-latest] | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
steps: | |
- name: Extract version from Github ref | |
id: get-version | |
env: | |
TAG: ${{ github.ref }} | |
run: | | |
version=${TAG:10} | |
echo "version=$version" >> $GITHUB_OUTPUT | |
build: | |
runs-on: [ubuntu-latest] | |
needs: get-version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and push Antrea Ubuntu amd64 Docker image to registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
VERSION: ${{ needs.get-version.outputs.version }} | |
run: | | |
./hack/build-antrea-linux-all.sh --pull | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker tag antrea/antrea-ubuntu:"${VERSION}" antrea/antrea-ubuntu-amd64:"${VERSION}" | |
docker push antrea/antrea-ubuntu-amd64:"${VERSION}" | |
- name: Trigger Antrea arm builds and multi-arch manifest update | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
repo: vmware-tanzu/antrea-build-infra | |
ref: refs/heads/main | |
workflow: Build Antrea ARM images and push manifest | |
token: ${{ secrets.ANTREA_BUILD_INFRA_WORKFLOW_DISPATCH_PAT }} | |
inputs: ${{ format('{{ "antrea-repository":"antrea-io/antrea", "antrea-ref":"{0}", "docker-tag":"{1}" }}', github.ref, needs.get-version.outputs.version) }} | |
build-ubi: | |
runs-on: [ubuntu-latest] | |
needs: get-version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and push Antrea UBI8 amd64 Docker image to registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
VERSION: ${{ needs.get-version.outputs.version }} | |
run: | | |
./hack/build-antrea-linux-all.sh --pull --distro ubi | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push antrea/antrea-ubi:"${VERSION}" | |
build-windows: | |
runs-on: [windows-2019] | |
needs: get-version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Antrea Windows Docker image and push to registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
VERSION: ${{ needs.get-version.outputs.version }} | |
run: | | |
make build-windows | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push antrea/antrea-windows:"${VERSION}" | |
shell: bash | |
build-antrea-mc-controller: | |
runs-on: [ubuntu-latest] | |
needs: get-version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build antrea-mc-controller Docker image and push to registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
VERSION: ${{ needs.get-version.outputs.version }} | |
run: | | |
make build-antrea-mc-controller | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push antrea/antrea-mc-controller:"${VERSION}" | |
build-flow-aggregator: | |
runs-on: [ubuntu-latest] | |
needs: get-version | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build flow-aggregator Docker image and push to registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
VERSION: ${{ needs.get-version.outputs.version }} | |
run: | | |
make flow-aggregator-image | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push antrea/flow-aggregator:"${VERSION}" |