commit c4130bb601cf752a1128e080249a550e3575af27 Author: enve Date: Tue Sep 24 20:37:36 2024 +0200 initial commit diff --git a/.gitea/workflows/docker_build_push.yaml b/.gitea/workflows/docker_build_push.yaml new file mode 100644 index 0000000..54d4f41 --- /dev/null +++ b/.gitea/workflows/docker_build_push.yaml @@ -0,0 +1,22 @@ +name: ci + +on: + push: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: gitea.enve.dev + username: enve + password: ${{ secrets.PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: gitea.enve.dev/enve.dev/actions_test:latest \ No newline at end of file diff --git a/.gitea/workflows/workflows_demo.yaml b/.gitea/workflows/workflows_demo.yaml new file mode 100644 index 0000000..f3cc016 --- /dev/null +++ b/.gitea/workflows/workflows_demo.yaml @@ -0,0 +1,19 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + 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 }}." + - name: Check out repository code + uses: actions/checkout@v4 + - 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 -alh ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9fb6c5a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +#Build the Go Binary. +FROM golang:1.22 as build_actions_test +ENV CGO_ENABLED 0 + +# Copy the source code into the container. +COPY . /service + +# Build the actions_test binary. +WORKDIR /service +RUN go build + +# Run the Go Binary in Alpine. +FROM alpine:3.20 +COPY --from=build_actions_test /service/ /app/ +WORKDIR /app +CMD ["./actions_test"] \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5a74fdd --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module actions_test + +go 1.22 \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..55e596d --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "log" + +func main(){ + log.Println("KEKW") +} \ No newline at end of file