Skip to content

Commit

Permalink
ci: test with updated permissions and refs
Browse files Browse the repository at this point in the history
  • Loading branch information
musicEnfanthen committed Feb 1, 2025
1 parent b1b6068 commit 1c5ce3e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
name: Validate Source

on:
pull_request_target:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout base repository
- name: Checkout head ref of repository (PR)
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Checkout head repository (PR)
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
path: pull_request
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.event.pull_request.head.ref}}
fetch-depth: 0

- name: Run validation with Docker image on PR
run: docker run --rm -v $(pwd)/pull_request:/opt/docker-mei/music-encoding ghcr.io/music-encoding/docker-mei:latest ant validate-source -noinput -buildfile music-encoding/build.xml
run: docker run --rm -v $(pwd):/opt/docker-mei/music-encoding ghcr.io/music-encoding/docker-mei:latest ant validate-source -noinput -buildfile music-encoding/build.xml

0 comments on commit 1c5ce3e

Please sign in to comment.