Compare commits
3 Commits
fb3b248014
...
264f9333aa
Author | SHA1 | Date | |
---|---|---|---|
|
264f9333aa | ||
64336b1c23 | |||
3441b00dbf |
2
.github/workflows/ci-demo.yaml
vendored
2
.github/workflows/ci-demo.yaml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: Github Actions CI Demo
|
name: Github Actions CI Demo
|
||||||
run-name: ${{ github.actor }} is testing out Github Actions 🚀
|
run-name: ${{ github.actor }} is testing out Github Actions of docker 🚀
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
50
.github/workflows/setup-go.yaml
vendored
Normal file
50
.github/workflows/setup-go.yaml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Test setup-go Actions
|
||||||
|
run-name: ${{ github.actor }} is testing out Github Actions of setup-go 🚀
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Explore-Github-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Show details
|
||||||
|
run: |
|
||||||
|
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
|
echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Github!"
|
||||||
|
echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||||
|
-
|
||||||
|
name: Checkout repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: List files in the repository
|
||||||
|
run: |
|
||||||
|
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
||||||
|
echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
|
ls ${{ github.workspace }}
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
-
|
||||||
|
name: Setup golang
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '>=1.21.0'
|
||||||
|
-
|
||||||
|
name: Run golang scripts
|
||||||
|
run: |
|
||||||
|
go env -w GOPROXY='https://goproxy.cn,direct'
|
||||||
|
go env
|
||||||
|
go run cmd/helloworld/main.go
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
16
README.md
16
README.md
@ -13,4 +13,18 @@ docker run -itd \
|
|||||||
--name gitea_runner \
|
--name gitea_runner \
|
||||||
gitea/act_runner:latest
|
gitea/act_runner:latest
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
docker run \
|
||||||
|
-v $PWD/config.yaml:/config.yaml \
|
||||||
|
-v $PWD/data:/data \
|
||||||
|
-v $PWD/cache:/root/.cache \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-e CONFIG_FILE=/config.yaml \
|
||||||
|
-e GITEA_INSTANCE_URL=https://gitea.example.com/ \
|
||||||
|
-e GITEA_RUNNER_REGISTRATION_TOKEN=mytoken \
|
||||||
|
-e GITEA_RUNNER_NAME=local-cached \
|
||||||
|
-p 18000:18000 \
|
||||||
|
-d gitea/act_runner:nightly
|
||||||
|
```
|
||||||
|
7
cmd/helloworld/main.go
Normal file
7
cmd/helloworld/main.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello world!")
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user