test
This commit is contained in:
@@ -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 }}."
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user