ci: use public Gitea URL (https://git.uuxo.net) for checkout
This commit is contained in:
@@ -8,6 +8,9 @@ on:
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
env:
|
||||
GITEA_URL: https://git.uuxo.net
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -16,12 +19,12 @@ jobs:
|
||||
image: golang:1.23-bookworm
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y git
|
||||
run: apt-get update && apt-get install -y git ca-certificates
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git .
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
@@ -41,12 +44,12 @@ jobs:
|
||||
image: golang:1.23-bookworm
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y git
|
||||
run: apt-get update && apt-get install -y git ca-certificates
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git .
|
||||
|
||||
- name: Install golangci-lint
|
||||
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.62.2
|
||||
@@ -66,12 +69,12 @@ jobs:
|
||||
goarch: [amd64, arm64]
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y git
|
||||
run: apt-get update && apt-get install -y git ca-certificates
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git .
|
||||
|
||||
- name: Build binary
|
||||
env:
|
||||
@@ -93,12 +96,12 @@ jobs:
|
||||
image: golang:1.23-bookworm
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y git
|
||||
run: apt-get update && apt-get install -y git ca-certificates
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth 1 --branch ${GITHUB_REF_NAME} ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git .
|
||||
|
||||
- name: Install Syft
|
||||
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||
@@ -118,14 +121,14 @@ jobs:
|
||||
steps:
|
||||
- name: Install tools
|
||||
run: |
|
||||
apt-get update && apt-get install -y git
|
||||
apt-get update && apt-get install -y git ca-certificates
|
||||
curl -sSfL https://github.com/goreleaser/goreleaser/releases/download/v2.4.8/goreleaser_Linux_x86_64.tar.gz | tar xz -C /usr/local/bin goreleaser
|
||||
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
git clone --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --branch ${GITHUB_REF_NAME} ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git .
|
||||
git fetch --tags
|
||||
|
||||
- name: Run goreleaser
|
||||
|
||||
Reference in New Issue
Block a user