-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tooling rehaul: introduce ARM64 release; use git tags instead of `pro…
…duction` branch for releases (#68) * Use Goreleaser, and publish arm64 Signed-off-by: peterdeme <[email protected]> * Add setup composite action Signed-off-by: peterdeme <[email protected]> --------- Signed-off-by: peterdeme <[email protected]>
- Loading branch information
Showing
15 changed files
with
378 additions
and
500 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build & Publish | ||
|
||
on: [push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish: | ||
name: 🚀 Build and publish VCS Agent | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish binary & Docker image | ||
uses: ./.github/workflows/publish | ||
with: | ||
aws_role_to_assume: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.AWS_ROLE_TO_ASSUME || secrets.PREPROD_AWS_ROLE_TO_ASSUME }} | ||
ecr_repository_url: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.PUBLIC_VCS_AGENT_ECR_REPOSITORY_URL || secrets.PREPROD_PUBLIC_VCS_AGENT_ECR_REPOSITORY_URL }} | ||
aws_bucket: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.AWS_S3_BUCKET || secrets.PREPROD_AWS_S3_BUCKET }} | ||
cloudfront_distribution: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.DISTRIBUTION || secrets.PREPROD_DISTRIBUTION }} | ||
bugsnag_api_key: ${{ startsWith(github.ref, 'refs/tags/v') && secrets.BUGSNAG_API_KEY || secrets.PREPROD_BUGSNAG_API_KEY }} | ||
gpg_key_id: ${{ secrets.GPG_KEY_ID }} | ||
gpg_base64_key: ${{ secrets.GPG_KEY_BASE64 }} | ||
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run GoReleaser | ||
description: Sets up the proper Go version, Docker Buildx, QEMU, and runs GoReleaser | ||
|
||
inputs: | ||
snapshot: | ||
description: Whether to create a snapshot release or real one | ||
default: "true" | ||
bugsnag_api_key: | ||
description: The Bugsnag API key | ||
default: "NOT_SET" | ||
repository_url: | ||
description: The repository URL that GoReleaser will use to create the Docker images | ||
required: true | ||
github_token: | ||
description: The GitHub token | ||
required: false | ||
disable_github_release: | ||
description: Whether to disable publishing the GitHub release | ||
default: "true" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: { go-version: "1.20" } | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: "linux/amd64,linux/arm64" | ||
|
||
- name: Run GoReleaser | ||
id: goreleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
args: release --snapshot=${{ inputs.snapshot }} | ||
env: | ||
BUGSNAG_API_KEY: ${{ inputs.bugsnag_api_key }} | ||
REPOSITORY_URL: ${{ inputs.repository_url }} | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
DISABLE_GITHUB_RELEASE: ${{ inputs.disable_github_release }} | ||
|
||
outputs: | ||
metadata: | ||
description: The release metadata of GoReleaser | ||
value: ${{ steps.goreleaser.outputs.metadata }} |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.