Skip to content

Image push release

Image push release #17

name: Image push release
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
version:
description: CNI network pluging version
required: true
jobs:
push-amd64:
name: Image push/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ steps.repo_name.outputs.repository }}
tags: |
type=ref,event=tag
flavor: |
latest=false
- name: Build and push container image
uses: docker/build-push-action@v4
with:
context: .
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ github.event.inputs.version }}
file: ./Dockerfile