Skip to content

Merge pull request #200 from sunya-ch/v1.2.4-rebase #67

Merge pull request #200 from sunya-ch/v1.2.4-rebase

Merge pull request #200 from sunya-ch/v1.2.4-rebase #67

name: Build and push daemon image
on:
push:
branches:
- v1.2.4
paths:
- daemon/**
- cni/**
- Makefile
env:
IMAGE_VERSION: '1.2.4'
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 }}:v${{ env.IMAGE_VERSION }}
file: ./daemon/dockerfiles/Dockerfile