Adds job to test curren pull request code against charts active branches #238
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull-Request | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: rancher/dapper:v0.5.4 | |
steps: | |
- 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: Checkout charts Repo | |
uses: actions/checkout@v3 | |
with: | |
repository: rancher/charts | |
ref: ${{ matrix.branch }} | |
path: charts | |
- name: File hierarchy | |
run: tree -a | |
- name: Run Validation | |
run: | | |
cd charts | |
../bin/charts-build-scripts validate |