Skip to content

Commit

Permalink
fix: Attempt migrating evaluate-label to a reusable action
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Jan 16, 2025
1 parent b906ed8 commit aea887b
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,14 @@ on:
- "*"

jobs:
evaluate-label:
version:
runs-on: ubuntu-latest
outputs:
label: ${{ steps.label_step.outputs.version}}
version: ${{ steps.classify.outputs.version}}

steps:
- name: checks for the label
id: label_step
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "version=latest" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.ref_type }}" == "branch" ]] && [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
exit 1
fi
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "version=stable" >> $GITHUB_OUTPUT
fi
- id: classify
uses: qiboteam/workflows/actions/docs/version@evaluate-label

deploy-docs:
needs: [evaluate-label]
Expand Down

0 comments on commit aea887b

Please sign in to comment.