chore: bump go; minor refactor to github workflow #2
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: release | |
on: [ push ] | |
jobs: | |
release_build: | |
env: | |
LATEST_GO: 1.21.x # version used for release | |
strategy: | |
matrix: | |
go: [ 1.21.x ] | |
os: [ ubuntu-latest ] | |
arch: | |
- arm64 | |
- amd64 | |
name: ${{ matrix.os }}/go${{ matrix.go }} ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: make test | |
- 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.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- run: | | |
make push PLUGIN_NAME=ghcr.io/${{ github.repository }} PLUGIN_TAG=$RELEASE_VERSION-${{ matrix.arch }} ARCH=${{ matrix.arch }} |