Skip to content

Set VERSION to v1.15.1 #99

Set VERSION to v1.15.1

Set VERSION to v1.15.1 #99

Workflow file for this run

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@v4
with:
show-progress: false
- 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 tag antrea/antrea-agent-ubuntu:"${VERSION}" antrea/antrea-agent-ubuntu-amd64:"${VERSION}"
docker tag antrea/antrea-controller-ubuntu:"${VERSION}" antrea/antrea-controller-ubuntu-amd64:"${VERSION}"
docker push antrea/antrea-ubuntu-amd64:"${VERSION}"
docker push antrea/antrea-agent-ubuntu-amd64:"${VERSION}"
docker push antrea/antrea-controller-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@v4
with:
show-progress: false
- 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}"
docker push antrea/antrea-agent-ubi:"${VERSION}"
docker push antrea/antrea-controller-ubi:"${VERSION}"
build-windows:
runs-on: [windows-2019]
needs: get-version
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- 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@v4
with:
show-progress: false
- 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@v4
with:
show-progress: false
- 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}"