Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: refactor release ci #118

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Release Docs
on:
workflow_dispatch:
workflow_call:
inputs:
push_coverage_changes:
type: boolean
default: false

permissions:
contents: write
Expand Down Expand Up @@ -77,10 +73,16 @@ jobs:
- id: coverage_changed
run: echo "coverage_changed=$(git status --porcelain -u | grep -c docs/coverage.svg)" >> "$GITHUB_OUTPUT"

# Debug info
- env:
UP_TO_DATE: ${{ github.ref == 'refs/heads/main' }}
run: echo "$UP_TO_DATE"

- id: push_coverage
env:
COVERAGE_CHANGED: ${{ steps.coverage_changed.outputs.coverage_changed }}
run: echo "push_coverage=$(if [ "$COVERAGE_CHANGED" = '0' ] ; then echo '0' ; else git status --porcelain -u | grep -c docs/coverage.svg ; fi)" >> "$GITHUB_OUTPUT"
UP_TO_DATE: ${{ github.ref == 'refs/heads/main' }}
run: echo "push_coverage=$(if [[ "$COVERAGE_CHANGED" != '0' && "$UP_TO_DATE" ]] ; then echo '1' ; else echo '0' ; fi)" >> "$GITHUB_OUTPUT"

- if: steps.push_coverage.outputs.push_coverage != '0'
uses: ./.github/actions/unprotect-main
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ jobs:
needs: release
if: needs.release.outputs.did_release != '0'
uses: ./.github/workflows/release-docs.yml
with:
push_coverage_changes: true