Skip to content

Rename LISCENCE to LICENSE #28

Rename LISCENCE to LICENSE

Rename LISCENCE to LICENSE #28

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
release:
types: [published]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.3'
- name: Check out code
uses: actions/checkout@v3
- name: Check formatting
run: |
test -z $(gofmt -l .)
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.3'
- name: Install dependencies
run: go get ./src
- name: Build
run: go build -o ./dist/bin ./src
- name: Test with the Go CLI
run: go test ./src
build-and-publish-image:
runs-on: ubuntu-latest
needs:
- lint
- build-and-test
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Tag the image
id: meta
uses: docker/metadata-action@v4
with:
images: |
bitovi/temporal-cloud-metrics-to-k8s
tags: |
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
-
name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
-
name: Push Docker image
uses: docker/build-push-action@v4
if: ${{ (github.ref_name == 'main') || (github.event_name == 'release') }}
with:
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
push: true