Files
netbird-kubeapi-proxy/.github/workflows/release.yaml
T

45 lines
1.4 KiB
YAML

name: release
on:
release:
types: [published]
permissions:
contents: read
packages: write
id-token: write
defaults:
run:
shell: bash
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c #v6.4.0
with:
go-version-file: go.mod
- name: Set up Docker
uses: docker/setup-docker-action@b2189fbf2a6592b51fee7cdd93ee2bfaeba733db #v5.1.0
with:
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd #v4.0.0
with:
driver: docker
- name: Login to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 #v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: |
IMG_REF=$(make build-image-multiarch IMG_REPOSITORY=${{ github.repository_owner }}/netbird-kubeapi-proxy IMG_TAG=${{ github.event.release.tag_name }}) || exit 1
docker push ${IMG_REF}