diff --git a/.github/workflows/authorship.yml b/.github/workflows/authorship.yml deleted file mode 100644 index c4198ef5..00000000 --- a/.github/workflows/authorship.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Check Author - -env: - CHECKS_ORG: alire-project - CHECKS_REPO: alire-index-checks - ALR_VERSION: 2.1.0 - -on: - pull_request: - paths: - - 'index/**.toml' - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - # Needed to be able to diff and obtain changed files. Furthermore, we - # need the full history or else grafted partial branches confuse the - # changed files detectors. - - - name: Check out alire-index-checks - uses: actions/checkout@v4 - with: - repository: ${{env.CHECKS_ORG}}/${{env.CHECKS_REPO}} - ref: ${{github.base_ref}} - path: ${{env.CHECKS_REPO}} - - - name: Set up stable `alr` - uses: alire-project/setup-alire@v5 - with: - version: ${{env.ALR_VERSION}} - - - name: Test authorship - run: ${{env.CHECKS_REPO}}/scripts/check-author.sh "${{ github.event.pull_request.user.login }}" - shell: bash diff --git a/.github/workflows/check-authorship.yml b/.github/workflows/check-authorship.yml new file mode 100644 index 00000000..e66e13e2 --- /dev/null +++ b/.github/workflows/check-authorship.yml @@ -0,0 +1,15 @@ +name: Check Author + +on: + pull_request: + paths: + - 'index/**.toml' + +jobs: + check: + uses: ./.github/workflows/check-with-script.yml + with: + name: Author + script: check-author.sh + script_arg: ${{github.event.pull_request.user.login}} + setup_alr: true diff --git a/.github/workflows/check-crate-name.yml b/.github/workflows/check-crate-name.yml new file mode 100644 index 00000000..ad6e23bb --- /dev/null +++ b/.github/workflows/check-crate-name.yml @@ -0,0 +1,14 @@ +name: Check Crate Name + +on: + pull_request: + paths: + - 'index/**.toml' + +jobs: + check: + uses: ./.github/workflows/check-with-script.yml + with: + name: Crate Name + script: check-crate-name.sh + script_arg: ${{github.event.pull_request.title}} diff --git a/.github/workflows/check-with-script.yml b/.github/workflows/check-with-script.yml new file mode 100644 index 00000000..bd795f46 --- /dev/null +++ b/.github/workflows/check-with-script.yml @@ -0,0 +1,58 @@ +name: Check With Script + +on: + workflow_call: + inputs: + name: + description: Display name for the check job + required: true + type: string + script: + description: Script filename under alire-index-checks/scripts/ + required: true + type: string + script_arg: + description: Single argument passed to the script + required: true + type: string + setup_alr: + description: Whether to install alr before running the script + required: false + type: boolean + default: false + +env: + CHECKS_ORG: alire-project + CHECKS_REPO: alire-index-checks + ALR_VERSION: 2.1.0 + +jobs: + check: + name: ${{inputs.name}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Needed to be able to diff and obtain changed files. Furthermore, + # we need the full history or else grafted partial branches confuse + # the changed files detectors. + + - name: Check out alire-index-checks + uses: actions/checkout@v4 + with: + repository: ${{env.CHECKS_ORG}}/${{env.CHECKS_REPO}} + ref: ${{github.base_ref}} + path: ${{env.CHECKS_REPO}} + + - name: Set up stable `alr` + if: inputs.setup_alr + uses: alire-project/setup-alire@v5 + with: + version: ${{env.ALR_VERSION}} + + - name: Run check + run: > + ${{env.CHECKS_REPO}}/scripts/${{inputs.script}} + "${{inputs.script_arg}}" + shell: bash diff --git a/index/li/libhello/libhello-1.0.1.toml b/index/li/libhello/libhello-1.0.1.toml index 5d98b1df..2cff43e0 100644 --- a/index/li/libhello/libhello-1.0.1.toml +++ b/index/li/libhello/libhello-1.0.1.toml @@ -15,4 +15,4 @@ url = "git+https://github.com/alire-project/libhello.git" # We use this crate as a trigger to conveniently test minor changes to # metaprocesses of the CI of the repository itself. -# Last touch: 2025-12-13 18:31 CET +# Last touch: 2026-05-22 17:13 CEST