Skip to content

Update tracing pattern #283

Update tracing pattern

Update tracing pattern #283

Workflow file for this run

name: Test & Build
on: push
jobs:
test:
name: Test
runs-on: ubuntu-latest-8cpu
env:
GOEXPERIMENT: loopvar
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.x
check-latest: true
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Vet
run: go vet ./...
- name: Test
run: go test -v -race ./...
build:
name: Build
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
needs:
- test
permissions:
contents: read # required for checkout
id-token: write # mint AWS credentials through OIDC
packages: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile
image_name: stdlib-source
env:
GOEXPERIMENT: loopvar
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/overmindtech/${{ matrix.image_name }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: depot/setup-action@v1
- name: Build and push
id: push
uses: depot/build-push-action@v1
with:
project: p8746rqzcw
file: build/package/${{ matrix.dockerfile }}
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Prepare Deployment
run: |
echo "ghcr.io/overmindtech/${{ matrix.image_name }}@${{ steps.push.outputs.digest }}" | tee ${{ matrix.image_name }}.imageref
- name: Upload Deployment File
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.image_name }}.imageref
path: ${{ matrix.image_name }}.imageref