actions-ci #2852
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
# Copyright (c) 2022 Sharezone UG (haftungsbeschränkt) | |
# Licensed under the EUPL-1.2-or-later. | |
# | |
# You may obtain a copy of the Licence at: | |
# https://joinup.ec.europa.eu/software/page/eupl | |
# | |
# SPDX-License-Identifier: EUPL-1.2 | |
# This workflow handles the CI for our GitHub Action files. | |
# | |
# Therefore, it's only triggered on pull requests that make changes to the | |
# GitHub Action files. | |
name: actions-ci | |
concurrency: | |
group: actions-ci-${{ github.head_ref }} | |
# In order to conserve the use of GitHub Actions, we cancel the running action | |
# of the previous commit. This means that if you first commit "A" and then | |
# commit "B" to the pull request a few minutes later, the workflow for commit | |
# "A" will be cancelled. | |
cancel-in-progress: true | |
on: | |
# Triggers the workflow on pull request events | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
# It's important to trigger this workflow again when the pull is changing | |
# from a draft pull request to a ready for review pull request. | |
# | |
# Some jobs are skipped when the pull request is a draft. Therefore, we | |
# need to trigger these jobs again when the pull request is changing to | |
# ready for review. | |
- ready_for_review | |
merge_group: | |
types: | |
- checks_requested | |
# Set permissions to none. | |
# | |
# Using the broad default permissions is considered a bad security practice | |
# and would cause alerts from our scanning tools. | |
permissions: {} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# We can't use the official "paths" filter because it has no support for merge | |
# groups and we would need some kind of fallback CI when a check is required | |
# but ignored because of the path filter. | |
# | |
# See: | |
# * https://github.com/community/community/discussions/45899 (merge groups) | |
# * https://github.com/github/docs/commit/4364076e0fb56c2579ae90cd048939eaa2c18954 | |
# (workaround for required checks with path filters) | |
changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
changesFound: ${{ steps.filter.outputs.changesFound }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: AurorNZ/paths-filter@3b1f3abc3371cca888d8eb03dfa70bc8a9867629 | |
id: filter | |
with: | |
filters: | | |
changesFound: | |
- ".github/workflows/**" | |
format: | |
needs: changes | |
runs-on: ubuntu-22.04 | |
if: ${{ needs.changes.outputs.changesFound == 'true' }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Install Prettier | |
run: npm install --global [email protected] | |
- name: Format | |
run: ./bin/check_format_action_files.sh |