From 9a0e1fceeaa4afa154fd9191b93a77e29da61398 Mon Sep 17 00:00:00 2001 From: ScuroNeko Date: Thu, 23 Apr 2026 13:36:35 +0300 Subject: [PATCH] test --- .gitea/workflows/demo.yaml | 19 +++++++++++++++++ .gitea/workflows/docker.yaml | 40 ++++++++++++++++++++++++++++++++++++ .gitea/workflows/go.yaml | 20 ++++++++++++++++++ .gitea/workflows/test.yaml | 17 --------------- 4 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 .gitea/workflows/demo.yaml create mode 100644 .gitea/workflows/docker.yaml delete mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml new file mode 100644 index 0000000..394c807 --- /dev/null +++ b/.gitea/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 ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml new file mode 100644 index 0000000..f3f1308 --- /dev/null +++ b/.gitea/workflows/docker.yaml @@ -0,0 +1,40 @@ +name: Build and push image +run-name: Building and pushing Docker image for ${{ gitea.repository }} by ${{ gitea.actor }} 🚀 +on: + push: + branches: [main] + tags: ["v*"] + +jobs: + docker: + runs-on: linux-latest + + steps: + - uses: actions/checkout@v6 + + - name: Set up Buildx + uses: docker/setup-buildx-action@v4 + + - name: Login to custom registry + uses: docker/login-action@v4 + with: + registry: git.scuroneko.dev + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: . + push: true + tags: git.scuroneko.dev/scuroneko/runner-test:${{ gitea.ref_name }} + + - name: Build and push tag image + if: startsWith(gitea.ref, 'refs/tags/') + uses: docker/build-push-action@v7 + with: + context: . + push: true + tags: | + git.scuroneko.dev/scuroneko/runner-test:${{ gitea.ref_name }} + git.scuroneko.dev/scuroneko/runner-test:latest diff --git a/.gitea/workflows/go.yaml b/.gitea/workflows/go.yaml index e69de29..fb99f79 100644 --- a/.gitea/workflows/go.yaml +++ b/.gitea/workflows/go.yaml @@ -0,0 +1,20 @@ +name: Golang lint +run-name: Linting code in ${{ gitea.repository }} by ${{ gitea.actor }} 🚀 +on: [push] + +jobs: + GoLint: + runs-on: linux-latest + steps: + - name: Check out repository code + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.26" + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.11 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml deleted file mode 100644 index 9f11041..0000000 --- a/.gitea/workflows/test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] - -jobs: - GoLint: - runs-on: linux-latest - steps: - - name: Check out repository code - uses: actions/checkout@v6 - - uses: actions/setup-go@v6 - with: - go-version: "1.26" - - uses: golangci/golangci-lint-action@v9 - with: - version: v2.11 -