feat: Add BYOB Gradle builder #5
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 2023 SLSA Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
on: | ||
workflow_call: | ||
inputs: | ||
rekor-log-public: | ||
description: "Private" | ||
required: false | ||
type: boolean | ||
default: false | ||
provenance-overwrite: | ||
description: "Overwrite provenance if already present" | ||
required: false | ||
type: boolean | ||
default: false | ||
artifact-list: | ||
description: "Comma-separated list of paths to artifacts to be released. Use GRADLE_VERSION for the gradle version, for example: 'artifact-GRADLE_VERSION-sources.jar'" | ||
type: string | ||
required: true | ||
jdk-version: | ||
description: "The JDK version" | ||
required: false | ||
default: 17 | ||
type: number | ||
jobs: | ||
slsa-setup: | ||
permissions: | ||
id-token: write # For token creation. | ||
outputs: | ||
slsa-token: ${{ steps.generate.outputs.slsa-token }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate the token | ||
id: generate | ||
uses: slsa-framework/slsa-github-generator/actions/delegator/setup-token@main | ||
with: | ||
slsa-workflow-recipient: "delegator_lowperms-generic_slsa3.yml" | ||
slsa-rekor-log-public: ${{ inputs.rekor-log-public }} | ||
slsa-runner-label: "ubuntu-latest" | ||
slsa-build-action-path: "./internal/builders/gradle" | ||
slsa-workflow-inputs: ${{ toJson(inputs) }} | ||
slsa-run: | ||
needs: [slsa-setup] | ||
permissions: | ||
id-token: write # For signing. | ||
contents: read # For asset uploads. | ||
actions: read # For the entrypoint. | ||
packages: write | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/delegator_lowperms-generic_slsa3.yml@main | ||
with: | ||
slsa-token: ${{ needs.slsa-setup.outputs.slsa-token }} |