Changed release workflow to create PR instead of pick #5980
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: Lint workflow | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/** | |
merge_group: | |
types: [checks_requested] | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out branch | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: ${{ github.repository }} | |
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} | |
- name: Check changed files for workflow changes | |
id: changed-workflows | |
run: | | |
if ${{ github.event_name == 'pull_request' }}; then | |
changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs) | |
else | |
changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs) | |
fi | |
count=$(( 0 )) | |
for file in $changed_files; do | |
if [[ "$file" == ".github/workflows/"* ]]; then | |
count=$(( $count + 1 )) | |
fi | |
done | |
echo "Workflow files changed: $count" | |
echo "changed_files_count=$count" >> $GITHUB_OUTPUT | |
- name: Set up Python 3.11 | |
if: steps.changed-workflows.outputs.changed_files_count != '0' | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: "3.11" | |
- name: Install bwwl binary | |
if: steps.changed-workflows.outputs.changed_files_count != '0' | |
run: python -m pip install --upgrade bitwarden_workflow_linter | |
- name: Lint | |
if: steps.changed-workflows.outputs.changed_files_count != '0' | |
run: bwwl lint -f .github/workflows |