Skip to content

Commit

Permalink
Install CRC on github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhoyos committed Mar 12, 2024
1 parent 42462ae commit 1858071
Show file tree
Hide file tree
Showing 2 changed files with 821 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/crc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI Pipeline

on:
# Run on main and release branches
push:
branches:
- main
- v*.*
paths-ignore:
- "docs/**"
- "**/*.md"
- "**/*.adoc"
pull_request:
branches:
- main
- v*.*
paths-ignore:
- "docs/**"
- "**/*.md"
- "**/*.adoc"

jobs:
initialize:
name: Initialize
runs-on: ubuntu-20.04
outputs:
target_branch: ${{ env.target_branch }}
build_branch: ${{ env.build_branch }}
steps:
- name: Determine target branch
id: target_branch
run: |
echo "target_branch=${{ github.base_ref || github.ref_name }}" >> $GITHUB_ENV
# For the building branch, if we are running agains a PR, we need to indicate in the branch that is coming from a PR
- name: Determine build branch
id: build_branch
run: |
if [ -z "${{ github.base_ref }}" ];
then
BUILD_BRANCH="${{ github.ref_name }}"
else
BUILD_BRANCH="${{ github.base_ref }}"
fi
echo "build_branch=$BUILD_BRANCH" >> $GITHUB_ENV
- name: Log information
run: |
echo "Target branch: ${{ env.target_branch }}"
echo "Build branch: ${{ env.build_branch }}"
install_crc:
name: Install CRC
runs-on: ubuntu-20.04
needs: [initialize]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.build_branch }}

- name: Install CRC
run: hack/crc-openshift.sh
Loading

0 comments on commit 1858071

Please sign in to comment.