dynamo-browse/.forgejo/workflows/ci.yaml

92 lines
2.5 KiB
YAML
Raw Normal View History

2022-03-23 11:02:46 +00:00
name: ci
on:
push:
branches:
- main
2025-10-25 22:26:04 +00:00
- feature/*
2022-03-23 11:02:46 +00:00
pull_request:
branches:
- main
jobs:
2025-10-25 22:35:23 +00:00
Build:
2025-04-29 10:04:44 +00:00
runs-on: docker
2022-03-23 11:02:46 +00:00
services:
2022-07-17 00:01:17 +00:00
localstack:
image: localstack/localstack
2022-03-23 11:02:46 +00:00
ports:
2022-07-17 00:01:17 +00:00
- "4566:4566"
env:
SERVICES: ssm,dynamodb
2022-03-23 11:02:46 +00:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v3
2022-03-23 11:02:46 +00:00
with:
2025-10-25 22:52:49 +00:00
go-version: 1.25
2022-03-23 11:02:46 +00:00
- name: Configure
run: |
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
- name: Test
run: |
set -xue
2022-03-23 11:04:27 +00:00
go get ./...
2022-06-11 02:10:39 +00:00
go test -p 1 ./...
2022-03-23 11:02:46 +00:00
env:
TEST_DYNAMO_URL: "http://localstack:4566"
GOPRIVATE: "github:com/lmika/*"
# Start Release
2025-10-25 22:27:50 +00:00
Site:
runs-on: docker
2025-10-25 23:28:38 +00:00
env:
NETLIFY_SITE_ID: 987651c8-4ffd-48d8-af67-4dbd49c48887
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
2025-10-25 22:31:07 +00:00
- name: Setup Go
uses: actions/setup-go@v3
with:
2025-10-25 22:31:07 +00:00
go-version: 1.24
- name: Install Hugo
run: |
2025-10-25 23:09:48 +00:00
curl -LO https://github.com/gohugoio/hugo/releases/download/v0.146.0/hugo_extended_0.146.0_linux-amd64.deb
apt install -y ./hugo_extended_0.146.0_linux-amd64.deb
2025-10-25 22:35:23 +00:00
- name: Build Site
run: |
2025-10-25 23:28:38 +00:00
cd _site
mkdir -p themes
git clone https://github.com/alex-shpak/hugo-book.git themes/hugo-book
2025-10-25 22:45:30 +00:00
npm install
2025-10-25 22:52:49 +00:00
hugo --minify
2025-10-25 23:28:38 +00:00
- name: Publish Site
run: |
cd _site
netlify deploy --dir docs --prod
2025-10-25 22:52:49 +00:00
2025-10-25 23:18:41 +00:00
'Release MacOS':
2025-10-25 22:52:49 +00:00
# needs: build
2025-10-25 23:18:41 +00:00
runs-on: macos
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.25
- name: Configure
run: |
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
- name: Setup Goreleaser
run: |
go install github.com/goreleaser/goreleaser/v2@v2.12.7
- name: Release
# if: startsWith(github.ref, 'refs/tags/')
run: |
goreleaser release -f macos.goreleaser.yml --skip=validate --clean
env:
2025-10-25 23:28:38 +00:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2025-10-25 23:18:41 +00:00
HOMEBREW_TAP_PRIVATE_KEY: ${{ secrets.HOMEBREW_TAP_PRIVATE_KEY }}