Skip to content

Commit

Permalink
Adding build-and-validate job to pull request workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmlp committed Jan 15, 2024
1 parent df3f147 commit 23c93af
Showing 1 changed file with 62 additions and 2 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI-pullrequest
name: Pull-Request

on: [pull_request]
on:
pull_request:

jobs:
build:
Expand All @@ -11,3 +12,62 @@ jobs:
- uses: actions/checkout@v1
- name: Run CI
run: dapper ci

build-binary:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout Pull-Request
run: gh pr checkout ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ github.token }}

- name: Build binaries
env:
CROSS: false
run: make build

- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: built-binary
path: bin/charts-build-scripts

validate:
needs: build-binary
runs-on: ubuntu-latest
strategy:
matrix:
branch: [dev-v2.9]
steps:
- name: Download Binary
uses: actions/download-artifact@v2
with:
name: built-binary
path: bin

- name: Allow binary to execute
run: chmod +x bin/charts-build-scripts

- name: Checkout charts Repo
uses: actions/checkout@v3
with:
repository: rancher/charts
ref: ${{ matrix.branch }}
path: charts

- name: Run Validation
run: |
cd charts
../bin/charts-build-scripts validate
delete-artifact:
needs: validate
runs-on: ubuntu-latest
steps:
- name: Delete Artifact
uses: geekyeggo/delete-artifact@v2
with:
name: built-binary

0 comments on commit 23c93af

Please sign in to comment.