feat: add Gitea workflow to build and upload binary to Cloudflare R2
Build and Push / build (godump, amd64, linux) (push) Successful in 22s

This commit is contained in:
2026-06-04 17:45:54 +00:00
parent 76f2129a5b
commit 18bfec87f2
+40
View File
@@ -0,0 +1,40 @@
name: Build and Push
on:
push:
branches:
- main
jobs:
build:
runs-on: build-htz-01
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
artifact: godump
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o "${{ matrix.artifact }}"
- name: Upload to Cloudflare R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
run: |
aws s3 cp "${{ matrix.artifact }}" "s3://apps/${{ matrix.artifact }}" \
--endpoint-url https://7d5f26fc811bce9e5fce50d5cd9914c6.r2.cloudflarestorage.com