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