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

85 lines
2.2 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
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 22:56:56 +00:00
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.146.0
2025-10-25 22:35:23 +00:00
- name: Build Site
run: |
2025-10-25 22:45:30 +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
# 'Release MacOS':
# needs: build
# 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: |
# brew install goreleaser/tap/goreleaser
# brew install goreleaser
# - name: Release
# # if: startsWith(github.ref, 'refs/tags/')
# run: |
# goreleaser release -f macos.goreleaser.yml --skip=validate --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}