Files
godump/.gitea/workflows/build.yml
T
jamie c4e5eddbc3
Build and Push / build (godump, amd64, linux) (push) Successful in 18s
chore: update R2 endpoint to use variable in build workflow
2026-06-04 17:56:18 +00:00

41 lines
998 B
YAML

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
R2_ENDPOINT_URL: ${{ secrets.R2_ENDPOINT_URL }}
run: |
aws s3 cp "${{ matrix.artifact }}" "s3://apps/${{ matrix.artifact }}" \
--endpoint-url $R2_ENDPOINT_URL