diff --git a/.github/actions/get-workflow-run-id/README.md b/.github/actions/get-workflow-run-id/README.md deleted file mode 100644 index ffa2e0f..0000000 --- a/.github/actions/get-workflow-run-id/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Get Workflow Run ID - -Get the ID of the latest successful workflow run. - -Accepts the following inputs: - -* `repository` (Required) - The repository owner and name (e.g. `spring-projects/spring-security`). -* `workflow-id` (Required) - The ID of the workflow or the workflow file name. - -Produces the following output: - -* `run-id` - The ID of the latest successful workflow run. - -## Installation - -```yaml -- id: get-workflow-run-id - name: Get Workflow Run ID - uses: spring-io/spring-security-release-tools/.github/actions/get-workflow-run-id@v1 - with: - repository: owner/repo - workflow-id: build-and-deploy.yml -``` - -## Example Usage - -```yaml -name: Download Artifacts - -on: push - -permissions: - actions: read - -jobs: - download-artifacts: - name: Download Artifacts - runs-on: ubuntu-latest - steps: - - id: get-workflow-run-id - name: Get Workflow Run ID - uses: spring-io/spring-security-release-tools/.github/actions/get-workflow-run-id@v1 - with: - repository: spring-projects/spring-security - workflow-id: continuous-integration-workflow.yml - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - name: maven-repository - path: build - repository: spring-projects/spring-security - github-token: ${{ github.token }} - run-id: ${{ steps.get-workflow-run-id.outputs.run-id }} - - name: Unzip Artifacts - run: pushd build && unzip maven-repository.zip && popd -``` diff --git a/.github/actions/get-workflow-run-id/action.yml b/.github/actions/get-workflow-run-id/action.yml deleted file mode 100644 index 46392eb..0000000 --- a/.github/actions/get-workflow-run-id/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Get Workflow Run ID' -description: 'Get the ID of the latest successful workflow run for a given workflow.' -author: 'sjohnr' - -inputs: - repository: - description: 'The repository owner and name (e.g. spring-projects/spring-security).' - required: true - workflow-id: - description: 'The ID of the workflow or the workflow file name (e.g. build-and-deploy.yml).' - required: true - -outputs: - run-id: - description: 'The ID of the latest successful workflow run.' - value: ${{ steps.get-workflow-run-id.outputs.run-id }} - -runs: - using: 'composite' - steps: - - id: get-workflow-run-id - name: Get Workflow Run ID - shell: bash - env: - GH_TOKEN: ${{ github.token }} - run: | - runId=$(gh run list -R ${{ inputs.repository }} -w ${{ inputs.workflow-id }} -s success --json databaseId -q '.[0].databaseId') - echo "run-id=$runId" >> $GITHUB_OUTPUT