Compare commits

..

No commits in common. "78fc7b1cb944b8904ec335c3e44794c4c2d93679" and "84d2035b9ef3b68ef70573bffaaccd6b20fc2e74" have entirely different histories.

3 changed files with 6 additions and 26 deletions

View File

@ -9,6 +9,8 @@ jobs:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
volumes: volumes:
- ubuntu_hostedtoolcache:/opt/hostedtoolcache - ubuntu_hostedtoolcache:/opt/hostedtoolcache
# env:
# RUNNER_TOOL_CACHE: /toolcache
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - 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 "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
@ -17,13 +19,7 @@ jobs:
- run: echo "🖥️ The workflow is now ready to test your code on the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: echo "🍏 This job's status is ${{ job.status }}." - run: echo "🍏 This job's status is ${{ job.status }}."
- run: docker version - run: docker version
- name: Checkout - name: Check out repository code
uses: https://gitea.com/actions/checkout@v4 env:
with: GITEA_TOKEN: ${{ secrets.GITEA1_TOKEN }}
fetch-depth: 0 uses: git clone root@106.14.174.241:3000/root/simple-go-action.git .
- 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

View File

@ -1,14 +0,0 @@
# 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,7 +6,6 @@ import (
"time" "time"
) )
func main() { func main() {
username := readInputs() username := readInputs()
fmt.Printf("username is %s\n", username) fmt.Printf("username is %s\n", username)
@ -17,7 +16,6 @@ func main() {
} }
} }
func readInputs() string { func readInputs() string {
username := os.Getenv("INPUT_USERNAME") username := os.Getenv("INPUT_USERNAME")
return username return username