test
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
name: Build and push image
|
||||
run-name: Building and pushing Docker image for ${{ gitea.repository }} by ${{ gitea.actor }} 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -10,7 +11,8 @@ jobs:
|
||||
runs-on: linux-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
@@ -22,12 +24,15 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
- name: Build and push branch image
|
||||
if: startsWith(gitea.ref, 'refs/heads/')
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.scuroneko.dev/scuroneko/runner-test:${{ gitea.ref_name }}
|
||||
tags: git.scuroneko.dev/scuroneko/runner-test:latest
|
||||
cache-from: type=gha,scope=runner-test
|
||||
cache-to: type=gha,mode=max,scope=runner-test
|
||||
|
||||
- name: Build and push tag image
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
@@ -38,3 +43,5 @@ jobs:
|
||||
tags: |
|
||||
git.scuroneko.dev/scuroneko/runner-test:${{ gitea.ref_name }}
|
||||
git.scuroneko.dev/scuroneko/runner-test:latest
|
||||
cache-from: type=gha,scope=runner-test
|
||||
cache-to: type=gha,mode=max,scope=runner-test
|
||||
@@ -13,6 +13,10 @@ jobs:
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.26"
|
||||
cache: true
|
||||
cache-dependency-path: |
|
||||
go.sum
|
||||
go.mod
|
||||
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
|
||||
Reference in New Issue
Block a user