Skip to content

feat: /@me/status public api (#21) #210

feat: /@me/status public api (#21)

feat: /@me/status public api (#21) #210

Workflow file for this run

name: "Build and push"
on:
push:
branches: [ main ]
env:
GO_VERSION: "1.26.0"
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/setup-go@v4
# with:
# go-version: "${{ env.GO_VERSION }}"
# cache: false
# - uses: actions/checkout@v4
# - name: go-lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: latest
# args: --timeout 5m0s
docker-build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Import Secrets
uses: hollow-cube/actions/secrets@main
with:
token: ${{ secrets.VAULT_TOKEN }}
path: global/github
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false # Disable built-in cache, we'll handle it manually
# Create cache directories before restoring
- name: Create Go cache directories
run: |
mkdir -p ~/go/pkg/mod
mkdir -p ~/.cache/go-build
- name: Cache Go modules and build cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-api-server-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-api-server-
${{ runner.os }}-go-
- uses: ko-build/setup-ko@v0.8
env:
KO_DOCKER_REPO: mworzala
- name: Build image
shell: bash
run: |
ko login docker.io --username mworzala --password ${{ env.DOCKER_PASS }}
ko build ./cmd/api-server --base-import-paths --tags ${{ github.sha }} --platform linux/amd64
echo "Version: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
helm-build:
needs: [ docker-build-and-publish ]
runs-on: ubuntu-latest
steps:
- name: Helm build
uses: hollow-cube/actions/helm-build@main
with:
vault-token: ${{ secrets.VAULT_TOKEN }}
name: api-server
path: "deploy/helm-chart"
helm-deploy:
needs: [ docker-build-and-publish, helm-build ]
runs-on: ubuntu-latest
steps:
- name: Helm deploy
uses: hollow-cube/actions/helm-deploy@main
with:
vault-token: ${{ secrets.VAULT_TOKEN }}
name: api-server
cluster: prod-v3
values: "deploy/helm-chart/values-prod.yaml"