debug s3 bucket and disable main ci for a while #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
permissions: | |
contents: read | |
jobs: | |
debug_s3_bucket: | |
runs-on: [self-hosted, small] | |
steps: | |
- uses: hostwithquantum/setup-mc@main | |
with: | |
alias-name: hetzner-bucket | |
alias-url: https://${{ vars.HETZNER_CACHE_REGION }}.${{ vars.HETZNER_CACHE_ENDPOINT }} | |
alias-access-key: ${{ secrets.HETZNER_CACHE_ACCESS_KEY }} | |
alias-secret-key: ${{ secrets.HETZNER_CACHE_SECRET_KEY }} | |
- name: List bucket | |
run: mc ls hetzner-bucket/${{ vars.HETZNER_CACHE_BUCKET }} | |
- uses: actions/checkout@v4 | |
- id: go-cache-paths | |
run: | | |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
- name: Go Cache | |
uses: tespkg/actions-cache@v1 | |
with: | |
endpoint: ${{ vars.HETZNER_CACHE_REGION }}.${{ vars.HETZNER_CACHE_ENDPOINT }} | |
bucket: ${{ vars.HETZNER_CACHE_BUCKET }} | |
accessKey: ${{ secrets.HETZNER_CACHE_ACCESS_KEY }} | |
secretKey: ${{ secrets.HETZNER_CACHE_SECRET_KEY }} | |
use-fallback: false | |
path: | | |
${{ steps.go-cache-paths.outputs.go-build }} | |
${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }} | |
- name: Go Build | |
run: go build -v ./cmd/... |