Skip to content

Support TID

Support TID #11461

Workflow file for this run

name: Artifacts
on:
pull_request:
branches:
- main
push:
tags:
- v*
branches:
- '**'
jobs:
artifacts:
name: Goreleaser release
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
container:
image: docker.io/goreleaser/goreleaser-cross:v1.22.4
options: --privileged
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
fetch-depth: 0
# https://github.com/actions/checkout/issues/766
- name: Add repository directory to the git global config as a safe directory
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Fetch all tags
run: git fetch --force --tags
- name: Run Goreleaser release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: goreleaser release --clean --verbose
- name: Run Goreleaser snapshot
run: |
goreleaser release --clean --verbose --snapshot
- name: Set snapshot tag
id: vars
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
run: echo "tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to registry
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push snapshot images
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
run: |
docker push ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-amd64
docker push ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-arm64
docker manifest create ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }} --amend ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-amd64 --amend ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-arm64
docker manifest annotate ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }} ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-arm64 --os linux --arch arm64
docker manifest annotate ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }} ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}-amd64 --os linux --arch amd64
docker manifest push ghcr.io/parca-dev/parca-agent:${{ steps.vars.outputs.tag }}
- name: Set up Jsonnet
run: ./env-jsonnet.sh
- name: Set up environment
run: ./env.sh
- name: Generate
run: cd deploy && make --always-make vendor manifests
- name: Prepare manifests for uploads
run: |
cp deploy/manifests/kubernetes-manifest.yaml deploy/manifests/kubernetes/manifest.yaml
cp deploy/manifests/openshift-manifest.yaml deploy/manifests/openshift/manifest.yaml
tar -zcvf deploy/manifests.tar.gz deploy/manifests
- uses: actions/upload-artifact@v4
with:
name: manifests
path: |
deploy/manifests.tar.gz
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
deploy/manifests.tar.gz
deploy/manifests/kubernetes-manifest.yaml
deploy/manifests/openshift-manifest.yaml
docs:
if: startsWith(github.ref, 'refs/tags/')
name: Update Docs with new manifests
runs-on: ubuntu-latest
needs: artifacts
steps:
- uses: actions/checkout@v4
- name: Publish Vercel
run: |
curl -X POST "https://api.vercel.com/v1/integrations/deploy/${{ secrets.VERCEL_WEBHOOK }}"