New annotation (gimlet.io/app) to explicitelly associate k8s services… #197
Workflow file for this run
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: 🚀 Publish Gimlet | |
on: | |
push: | |
tags: | |
- 'gimlet-v*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.23 | |
- name: ⬇️ Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 5 | |
- name: Version | |
id: version | |
run: | | |
if [[ $GITHUB_REF == refs/tags/* ]] | |
then | |
tag=${GITHUB_REF##refs/tags/} | |
v=${tag##gimlet-} | |
echo "::set-output name=version::$v" | |
else | |
echo "::set-output name=version::$GITHUB_SHA" | |
fi | |
- name: 🏗️ Build frontend | |
run: make build-frontend | |
- name: Dist | |
run: make dist-dashboard | |
env: | |
VERSION: ${{ steps.version.outputs.version }} | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope | |
- name: Build and push Gimlet image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: docker/dashboard/Dockerfile | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: | | |
ghcr.io/gimlet-io/gimlet:${{ steps.version.outputs.version }} | |
- name: Build and push Agent image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: docker/dashboard/Dockerfile.agent | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: | | |
ghcr.io/gimlet-io/gimlet:agent-${{ steps.version.outputs.version }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Gimlet ${{ steps.version.outputs.version }} | |
draft: false | |
prerelease: false |