cd.yaml: build project
Some checks failed
Build && Deploy / cargo build (push) Failing after 1m38s

This commit is contained in:
Akulij 2025-05-05 19:50:49 +03:00
parent 2abb18cb49
commit 77b5c734b5

View File

@ -1,17 +1,40 @@
name: Gitea Actions Demo name: Build && Deploy
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push] on: [push]
jobs: jobs:
Explore-Gitea-Actions: build:
name: cargo build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - uses: actions/checkout@v4
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - name: Setup Go
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." uses: actions/setup-go@v5
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." with:
- run: echo "🖥️ The workflow is now ready to test your code on the runner." go-version: 1.24
- name: List files in the repository
run: | - name: Restore cached build dependencies
ls ${{ gitea.workspace }} id: cache-project-dependencies
- run: echo "🍏 This job's status is ${{ job.status }}." uses: actions/cache/restore@v4
with:
path: |
~/.cache/go-build
key: linux-project-dependencies
- run: go env -w CGO_ENABLED=1
- env:
GOCACHE: ~/.cache/go-build
run: RUN --mount=type=cache,target="~/.cache/go-build" go build -o app ./cmd/app
- name: Save cached build dependencies
id: cache-project-dependencies-restore
uses: actions/cache/save@v4
with:
path: |
~/.cache/go-build
key: ${{ steps.cache-project-dependencies.outputs.cache-primary-key }}
- name: Upload Release Binary
id: bot-artifact
uses: christopherhx/gitea-upload-artifact@v4
with:
name: botrunner
path: app