Skip to content

Merge pull request #197 from sunya-ch/v1.3.0 #66

Merge pull request #197 from sunya-ch/v1.3.0

Merge pull request #197 from sunya-ch/v1.3.0 #66

name: Build and push daemon image
on:
push:
branches:
- main
- v1.3.0
paths:
- daemon/**
- cni/**
- Makefile
env:
IMAGE_VERSION: '1.3.0'
DAEMON_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
build-push-daemon:
runs-on: ubuntu-latest
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}-daemon
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17.0'
- name: Set up Docker
uses: docker/setup-buildx-action@v1
- name: Update CNI
run: make update-cni-local
working-directory: daemon
- name: Login to Docker
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push daemon
uses: docker/build-push-action@v2
with:
context: daemon
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ github.run_number }}
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:v${{ env.IMAGE_VERSION }}
file: ./daemon/dockerfiles/Dockerfile