Skip to content

Move displayPost methods that only use post fields to post #18

Move displayPost methods that only use post fields to post

Move displayPost methods that only use post fields to post #18

Workflow file for this run

---
name: Release a new version
on:
push:
tags:
- v*.*.*
env:
DOCKER_HUB_IMAGE: mm62/tmpbbs
jobs:
create-release:
name: Build and publish a container image and create a GitHub release
runs-on: ubuntu-latest
permissions:
attestations: write
contents: write
id-token: write
packages: write
steps:
- name: Log in to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repo
uses: actions/checkout@v4
- name: Extract image metadata
id: metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
with:
images: |
${{ env.DOCKER_HUB_IMAGE }}
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{raw}}
- name: Set up QEMU
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25
- name: Set up buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca
- name: Build and push image
id: push
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
with:
context: .
platforms: linux/amd64,linux/arm,linux/arm64
build-args: |
VERSION=${{ steps.metadata.outputs.version }}
COMMIT=${{ github.sha }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
sbom: true
push: true
- name: Generate signed build provenance attestation for Docker Hub
uses: actions/attest-build-provenance@v2
with:
subject-name: index.docker.io/${{ env.DOCKER_HUB_IMAGE }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
- name: Generate signed build provenance attestation for GitHub Container Registry
uses: actions/attest-build-provenance@v2
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
- name: Install golang
uses: actions/setup-go@v5
- name: Build binaries
run: ./build-release-binaries.sh "${{ steps.metadata.outputs.version }}" "${{ github.sha }}"
- name: Generate signed build provenance attestation for binaries
uses: actions/attest-build-provenance@v2
with:
subject-path: release/*
- name: Create release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda
with:
body: |
### Container Images
- ${{ env.DOCKER_HUB_IMAGE }}:${{ steps.metadata.outputs.version }}
- ghcr.io/${{ github.repository }}:${{ steps.metadata.outputs.version }}
files: release/*
generate_release_notes: true