Skip to content

Added the history of changes in plugin state #492

Added the history of changes in plugin state

Added the history of changes in plugin state #492

Workflow file for this run

name: CI/CD
on: push
jobs:
test_and_release:
name: CI/CD
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Run tests
run: go test -v ./...
- name: Get release version
if: startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build tools
if: startsWith(github.ref, 'refs/tags/')
env:
VERSION: ${{ env.RELEASE_VERSION }}
run: make cli-all-arch
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./out/runplugin-linux-amd64
./out/runplugin-linux-arm64
./out/runplugin-darwin-amd64
./out/runplugin-darwin-arm64
./out/runplugin-windows-amd64
./out/pluginctl-linux-amd64
./out/pluginctl-linux-arm64
./out/pluginctl-darwin-amd64
./out/pluginctl-darwin-arm64
./out/pluginctl-windows-amd64
./out/sesctl-linux-amd64
./out/sesctl-linux-arm64
./out/sesctl-darwin-amd64
./out/sesctl-darwin-arm64
./out/sesctl-windows-amd64
./out/sha1sum.txt
./out/sha256sum.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push_to_registry:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env:
REGISTRY: docker.io
IMAGE_NAME: waggle/scheduler
steps:
- name: Get release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up QEMU for multi-arch builds
uses: docker/setup-qemu-action@v1
- name: Set up Docker buildx for multi-arch builds
uses: docker/setup-buildx-action@v1
- name: Login to Github Package Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
build-args: VERSION=${{ env.RELEASE_VERSION }}
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE_VERSION }}