Release Prod #1
This file contains hidden or 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
| name: Release Prod | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Release"] | ||
| types: | ||
| - completed | ||
| workflow_dispatch: | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| jobs: | ||
| on_release: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| version: ${{ steps.set_version.outputs.version }} | ||
| steps: | ||
| - name: Checkout with full history | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Get version from selected ref or latest tag | ||
| id: set_version | ||
| run: | | ||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||
| VERSION="${{ github.ref_name }}" | ||
| echo "Using manually selected ref: $VERSION" | ||
| else | ||
| git fetch --tags | ||
| VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)") | ||
| echo "Detected latest tag from workflow_run: $VERSION" | ||
| fi | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| prod: | ||
| uses: ./.github/workflows/deploy.yml | ||
|
Check failure on line 39 in .github/workflows/release_prod.yml
|
||
| needs: on_release | ||
| secrets: inherit | ||
| with: | ||
| environment: prod | ||
| version: ${{ needs.on_release.outputs.version }} | ||