Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Update AVD to 4.3.0

Update AVD to 4.3.0 #7

---
name: build avd-all-in-one container
env:
_AVD_VERSION: "4.3.0"
_CVP_VERSION: "3.8.0"
_RELEASE_DATE: "2023-08-30"
# to avoid unknown/unknown image build
# check following thread for the details:
# https://github.com/orgs/community/discussions/45969
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
on:
push:
branches:
- master
jobs:
build_container_image:
runs-on: ubuntu-22.04
steps:
# checkout the repo
- name: Checkout
uses: actions/checkout@v3
# setup qemu
- name: setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: "linux/arm64/v8,linux/amd64"
# setup buildx
- name: setup buildX
uses: docker/setup-buildx-action@v2
# login to docker hub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# generate docker tags and labels
- name: Generate Docker tags and labels
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/arista-netdevops-community/avd-all-in-one-container/avd-all-in-one
tags: |
type=raw,value=latest
type=raw,value=avd${{ env._AVD_VERSION }}_cvp${{ env._CVP_VERSION }}
# only build the image in forked branches
- name: Build without pushing
uses: docker/build-push-action@v4
if: github.repository_owner != 'arista-netdevops-community'
with:
push: false
build-args: |
_AVD_VERSION=${{ env._AVD_VERSION }}
_CVP_VERSION=${{ env._CVP_VERSION }}
_RELEASE_DATE=${{ env._RELEASE_DATE }}
# images: ghcr.io/arista-netdevops-community/avd-all-in-one-container/avd-all-in-one
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64/v8,linux/amd64
# build and push the image
- name: Build and push
uses: docker/build-push-action@v4
if: github.repository_owner == 'arista-netdevops-community'
with:
push: true
build-args: |
_AVD_VERSION=${{ env._AVD_VERSION }}
_CVP_VERSION=${{ env._CVP_VERSION }}
_RELEASE_DATE=${{ env._RELEASE_DATE }}
# images: ghcr.io/arista-netdevops-community/avd-all-in-one-container/avd-all-in-one
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64/v8,linux/amd64
# delete old images
- name: Delete old containers
uses: actions/delete-package-versions@v4
if: github.repository_owner == 'arista-netdevops-community'
with:
package-name: avd-all-in-one-container/avd-all-in-one
package-type: container
min-versions-to-keep: 60
token: ${{ secrets.GITHUB_TOKEN }}