libovsdb-images #373
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: libovsdb-images | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
# run weekly to ensure our copy of ovs is up-to-date | |
- cron: '42 0 * * 0' | |
jobs: | |
build: | |
name: Build | |
if: github.repository == 'ovn-org/libovsdb' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: | |
- ovs_version: master | |
tag: latest | |
- ovs_version: v2.15.0 | |
tag: 2.15.0 | |
- ovs_version: v2.14.0 | |
tag: 2.14.0 | |
- ovs_version: v2.13.0 | |
tag: 2.13.0 | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: ovs | |
builder: ${{ steps.buildx.outputs.name }} | |
push: true | |
build-args: OVS_VERSION=${{ matrix.image.ovs_version }} | |
tags: libovsdb/ovs:${{ matrix.image.tag }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |