This commit is contained in:
parent
2abb18cb49
commit
77b5c734b5
@ -1,17 +1,40 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
name: Build && Deploy
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
build:
|
||||
name: cargo build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24
|
||||
|
||||
- name: Restore cached build dependencies
|
||||
id: cache-project-dependencies
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user