Log root error to span, not to console #9
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: | |
branches: [main] | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
publish-release: | |
name: Release to Docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Fetch git tags | |
run: git fetch --prune --unshallow --tags | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Extract tags/labels from Git | |
id: docker_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: yurishkuro/microsim | |
# The 'tags:' section defines how the Docker image will be tagged: | |
# - pushes to main branch will be published as 'latest' | |
# - pushes tagged with semver will be published as that version (without 'v') | |
# - other tags can be used as is | |
# Documentation: https://github.com/docker/metadata-action#tags-input | |
tags: | | |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
type=semver,pattern={{version}} | |
type=ref,event=tag | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: yurishkuro | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and maybe push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64 | |
- name: SBOM Generation | |
uses: anchore/[email protected] | |
with: | |
artifact-name: microsim-SBOM.spdx.json |