Skip to content

Commit

Permalink
Diff helper via labels
Browse files Browse the repository at this point in the history
Using pull_request_target
  • Loading branch information
mosteo committed Jul 8, 2024
1 parent a1c0ae1 commit 3374acf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/diff-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ env:
ALR_VERSION: 2.0.1

on:
pull_request:
# NOTE: pull_request_target runs with read/write permissions, no untrusted
# code should be run in this event. The workflow
pull_request_target:
paths:
- 'index/**.toml'

Expand All @@ -23,8 +25,9 @@ jobs:

steps:
- name: Check out alire-index
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
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
Expand All @@ -51,6 +54,15 @@ jobs:
toolchain: --disable-assistant # We don't need the compiler
branch: master

- name: Debug token
run: |
echo "PAT: ${{ secrets.LABEL_TOKEN }} GIT: ${{ secrets.GITHUB_TOKEN }}"
shell: bash

- name: <<DIFF RELEASES>>
run: ${{env.CHECKS_REPO}}/scripts/diff-release.sh || true # No deal breaker if failed
shell: bash
env:
GITHUB_EVENT_PATH: ${{ github.event_path }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to apply labels/comment
5 changes: 4 additions & 1 deletion index/li/libhello/libhello-1.0.1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ 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: 2024-05-23 17:40 CET
# Last touch: 2024-07-08 11:58 CET

[[depends-on]]
unobtanium = "*"

0 comments on commit 3374acf

Please sign in to comment.