initial commit
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
ci / docker (push) Successful in 37s

This commit is contained in:
enve 2024-09-24 20:37:36 +02:00
commit c4130bb601
5 changed files with 67 additions and 0 deletions

View File

@ -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

View File

@ -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 }}."

16
Dockerfile Normal file
View File

@ -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"]

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module actions_test
go 1.22

7
main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "log"
func main(){
log.Println("KEKW")
}