[release-v2.10] migrating to self-hosted runners: pull-request.yaml jobs #16
Workflow file for this run
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: Build | |
on: | |
pull_request: | |
branches: | |
- dev-v* | |
- release-v* | |
jobs: | |
build: | |
name: Validate | |
runs-on: org-${{ github.repository_owner_id }}-amd64-k8s | |
container: registry.suse.com/bci/bci-base:latest | |
steps: | |
- name: install dependencies | |
run: | | |
zypper --non-interactive addrepo -y https://cli.github.com/packages/rpm/gh-cli.repo | |
zypper --non-interactive refresh | |
zypper --non-interactive install gh docker jq git | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Git safe directory | |
run: git config --global --add safe.directory "$PWD" | |
- name: Set up PATH | |
run: echo $PATH >> $GITHUB_PATH | |
- name: Checkout base branch | |
uses: actions/checkout@v4 | |
- name: Checkout PR | |
run: gh pr checkout ${{ github.event.pull_request.number }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout into branch | |
run: git checkout -b staging-pr-workflow | |
- name: Pull scripts | |
run: make pull-scripts | |
- name: Check release.yaml | |
run: make check-release-yaml | |
- name: Validate | |
run: | | |
if [[ "${{ github.ref }}" == refs/heads/release-v* ]]; then | |
echo "Validating remote release branch" | |
make validate remote=true | |
else | |
echo "Validating local branch" | |
make validate | |
fi | |
- name: Check container images | |
run: make check-images | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Check RC images and charts | |
run: make check-rc | |
if: contains(github.base_ref, 'release-v') |