Skip to content

chore: release-please uses gh app to authenticate (#1164) #165

chore: release-please uses gh app to authenticate (#1164)

chore: release-please uses gh app to authenticate (#1164) #165

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.semantic-release.outputs.release_created }}
tag_name: ${{ steps.semantic-release.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.26"
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- name: Release
id: semantic-release
uses: googleapis/release-please-action@v4
with:
release-type: simple
token: ${{ steps.app-token.outputs.token }}
- name: Tag Images
if: ${{ steps.semantic-release.outputs.release_created }}
run: |
VERSION=${{ steps.semantic-release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
build-app:
name: Build API App
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/api
dockerfile: apps/api/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest
build-web:
name: Build Web App
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/web
dockerfile: apps/web/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest
build-workspace-engine:
name: Build Workspace Engine
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/workspace-engine
dockerfile: apps/workspace-engine/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest