Compare commits

...

17 Commits

Author SHA1 Message Date
dm 78fc7b1cb9 2 2024-08-13 10:51:28 +08:00
dm c904a6db9f 1
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m54s Details
2024-08-13 10:44:42 +08:00
dm 00cddc2f7d 23
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s Details
2024-08-13 09:56:16 +08:00
dm 4272f60528 22
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s Details
2024-08-13 09:55:30 +08:00
dm 404975fcec 21
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s Details
2024-08-13 09:51:54 +08:00
dm 12927c17ea 20
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s Details
2024-08-13 09:50:06 +08:00
dm 083c0ca7f2 19 2024-08-13 09:49:23 +08:00
dm 81a505c772 18 2024-08-13 09:48:26 +08:00
dm f23e219240 test17
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s Details
2024-08-13 09:39:38 +08:00
dm c245bc0faa test16
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 11s Details
2024-08-13 09:34:39 +08:00
dm 4bc5a281a3 test16
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s Details
2024-08-13 09:28:33 +08:00
dm 7b5be2d07d test15
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s Details
2024-08-13 09:26:15 +08:00
dm 57b0c4d296 test14
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s Details
2024-08-13 09:24:57 +08:00
dm 1311b6c659 test13
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s Details
2024-08-13 09:22:51 +08:00
dm ed9d812dc6 test12
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s Details
2024-08-13 09:18:19 +08:00
dm ca2ea06778 test11
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s Details
2024-08-13 09:16:08 +08:00
dm 0700862857 test10
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s Details
2024-08-13 09:14:24 +08:00
3 changed files with 26 additions and 6 deletions

View File

@ -9,8 +9,6 @@ jobs:
image: catthehacker/ubuntu:act-latest
volumes:
- ubuntu_hostedtoolcache:/opt/hostedtoolcache
# env:
# RUNNER_TOOL_CACHE: /toolcache
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!"
@ -19,7 +17,13 @@ jobs:
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: echo "🍏 This job's status is ${{ job.status }}."
- run: docker version
- name: Check out repository code
env:
GITEA_TOKEN: ${{ secrets.GITEA1_TOKEN }}
uses: git clone root@106.14.174.241:3000/root/simple-go-action.git .
- name: Checkout
uses: https://gitea.com/actions/checkout@v4
with:
fetch-depth: 0
- run: echo "🛠️ The Gitea Actions workflow is now ready to test your code on the runner."
- name: Build Docker image
run: docker build -t my-docker-image .
-name: Deploy to local Docker
run: docker run -d -p 8080:80 my-docker-image

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# Use an official Go runtime as the base image
FROM golang:1.21
# Set the working directory inside the container
WORKDIR /app
# Copy the source code into the container
COPY . .
# Build the Go application
RUN go build -o app
# Set the entry point for the container
ENTRYPOINT ["./app"]

View File

@ -6,6 +6,7 @@ import (
"time"
)
func main() {
username := readInputs()
fmt.Printf("username is %s\n", username)
@ -16,6 +17,7 @@ func main() {
}
}
func readInputs() string {
username := os.Getenv("INPUT_USERNAME")
return username