mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 11:31:05 +00:00
GHA is migrating ubuntu-latest to Ubuntu 24 so let's hardcode the current 22.04 LTS. https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/ Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: Skipper
|
|
|
|
# This workflow sets various "skip_*" output values that can be used to
|
|
# determine what workflows/jobs are expected to be executed. Sample usage:
|
|
#
|
|
# skipper:
|
|
# uses: ./.github/workflows/gatekeeper-skipper.yaml
|
|
# with:
|
|
# commit-hash: ${{ github.event.pull_request.head.sha }}
|
|
# target-branch: ${{ github.event.pull_request.base.ref }}
|
|
#
|
|
# your-workflow:
|
|
# needs: skipper
|
|
# if: ${{ needs.skipper.outputs.skip_build != 'yes' }}
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
commit-hash:
|
|
required: true
|
|
type: string
|
|
target-branch:
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
outputs:
|
|
skip_build:
|
|
value: ${{ jobs.skipper.outputs.skip_build }}
|
|
skip_test:
|
|
value: ${{ jobs.skipper.outputs.skip_test }}
|
|
skip_static:
|
|
value: ${{ jobs.skipper.outputs.skip_static }}
|
|
|
|
|
|
jobs:
|
|
skipper:
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
skip_build: ${{ steps.skipper.outputs.skip_build }}
|
|
skip_test: ${{ steps.skipper.outputs.skip_test }}
|
|
skip_static: ${{ steps.skipper.outputs.skip_static }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.commit-hash }}
|
|
fetch-depth: 0
|
|
- id: skipper
|
|
env:
|
|
TARGET_BRANCH: ${{ inputs.target-branch }}
|
|
run: |
|
|
python3 tools/testing/gatekeeper/skips.py | tee -a "$GITHUB_OUTPUT"
|
|
shell: /usr/bin/bash -x {0}
|