mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Delete .github/workflows/build.yml
This commit is contained in:
parent
a55a380d69
commit
92f5e5cc69
1 changed files with 0 additions and 103 deletions
103
.github/workflows/build.yml
vendored
103
.github/workflows/build.yml
vendored
|
|
@ -1,103 +0,0 @@
|
|||
name: Build, Test, and Deploy
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, closed] # Trigger on open, synchronize, reopened PRs
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint Code
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: build/cache
|
||||
key: ${{ runner.os }}-build-tools-cache-${{ hashFiles('build/checksums.txt') }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.23.0
|
||||
cache: false
|
||||
|
||||
- name: Run linters
|
||||
run: |
|
||||
go run build/ci.go lint
|
||||
go run build/ci.go check_tidy
|
||||
go run build/ci.go check_baddeps
|
||||
|
||||
build-go:
|
||||
name: Build & Test Go
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.0
|
||||
cache: false
|
||||
|
||||
- name: Run Go tests
|
||||
run: go test -short ./...
|
||||
env:
|
||||
GOOS: linux
|
||||
GOARCH: 386
|
||||
|
||||
check-labels: # 🛠️ FIXED: Now it's at the correct level
|
||||
name: Check PR Labels
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.merged == true
|
||||
steps:
|
||||
- name: Debug PR Number
|
||||
run: |
|
||||
echo "PR Number: ${{ github.event.pull_request.number }}"
|
||||
|
||||
- name: Fetch PR Labels
|
||||
id: label-check
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
PR_NUMBER="${{ github.event.pull_request.number }}"
|
||||
|
||||
if [ -z "$PR_NUMBER" ]; then
|
||||
echo "PR number is empty. This might not be running on a PR merge."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels"
|
||||
echo "Fetching labels from: $API_URL"
|
||||
|
||||
RESPONSE=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" "$API_URL")
|
||||
echo "API Response: $RESPONSE"
|
||||
|
||||
LABELS=$(echo "$RESPONSE" | jq -r '.[].name')
|
||||
|
||||
echo "Found labels: $LABELS"
|
||||
|
||||
if echo "$LABELS" | grep -q "CI:Build"; then
|
||||
echo "ci_build=true" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ci_build=false" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
build-docker:
|
||||
name: Build & Push Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint, build-go, check-labels]
|
||||
if: needs.check-labels.outputs.ci_build == 'true'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t ipangelov/go-ethereum:latest .
|
||||
|
||||
- name: Push Docker image to Docker Hub
|
||||
run: docker push ipangelov/go-ethereum:latest
|
||||
Loading…
Reference in a new issue