Skip to content

Commit

Permalink
Add permissions for attestation
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Aug 13, 2024
1 parent e3712b8 commit b54eac1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
needs: [josm-build, create_tag]
outputs:
plugin_directory: ${{ steps.version.outputs.plugin_directory }}
permissions:
id-token: write
attestations: write
steps:
- uses: JOSM/JOSMPluginAction/actions/setup-ant@v2
with:
Expand Down Expand Up @@ -113,6 +116,15 @@ jobs:
cd $GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}
ant -noinput -buildfile build.xml -Dplugin.version=${{ steps.version.outputs.version }}
- name: Perform attestation (jar)
uses: actions/attest-build-provenance@v1
with:
subject-path: josm/dist/${{ inputs.plugin-jar-name }}.jar
- name: Perform attestation (sources)
uses: actions/attest-build-provenance@v1
with:
subject-path: josm/dist/${{ inputs.plugin-jar-name }}-sources.jar

- name: Upload plugin build
id: cache-plugin-build
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ on:

jobs:
call-workflow:
permissions:
id-token: write
attestations: write
uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v2
```
Expand Down

0 comments on commit b54eac1

Please sign in to comment.