Skip to content

Commit

Permalink
chore: change to manual build
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Jan 6, 2025
1 parent 6d87d2c commit 1350eba
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 27 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# .github/workflows/main.yml

name: Build & Test

on:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./tools/go.mod
cache-dependency-path: |
tools/go.sum
go.sum
- run: make test
- uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Go Test Results
path: .test/reports/**-test.xml
reporter: java-junit
fail-on-error: "true"
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Test Reports
path: .test/reports/**

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./tools/go.mod
check-latest: true
- run: make lint

build:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./tools/go.mod
check-latest: true
- run: make build
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_PAT }}
commit-message: "Build artifacts"
title: "Build artifacts"
branch: "build-artifacts"
base: main
labels: build
draft: false
- if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- uses: peter-evans/create-or-update-comment@v4
with:
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray

27 changes: 0 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,4 @@ jobs:
go-version-file: ./tools/go.mod
check-latest: true
- run: make lint

build:
if: github.event.pull_request.merged != 'true'
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./tools/go.mod
check-latest: true
- run: make build
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_PAT }}
commit-message: "Build artifacts"
title: "Build artifacts"
branch: "build-artifacts"
base: "main"
labels: "build"
draft: false
- if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit 1350eba

Please sign in to comment.