Retrieves the project ID of the integrated Platform.sh project that is connected to a repository.
Uses the webhook integration URL to extract the Platform.sh project ID where an integration has been set up between a Platform.sh project and a GitHub repository. Does not require the use of a Platform.sh API Token.
github_token- REQUIRED. Github personal access token with access rights to the target repository so we can work with the github api.repository- Optional. Owner/namespace of the target repository. Defaults to {github.repository}
project_id- String of the Platform.sh Project ID.
- name: 'Get our Project ID'
id: get-projectid
uses: platformsh/gha-retrieve-projectid@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: "use our project ID"
run: |
echo "::notice::Our project ID is ${{ steps.get-projectid.output.project_id }}"