Skip to content

Commit

Permalink
dynamic-uses v1, vars, format
Browse files Browse the repository at this point in the history
  • Loading branch information
zMynxx committed Aug 18, 2023
1 parent db6c47f commit 76dc48f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
check:
name: check pr status
runs-on: ubuntu-22.04
env:
vars:
ORG_NAME: zMynxx
REPO_NAME: github-actions
REF: feature/gha
Expand All @@ -20,18 +20,18 @@ jobs:
- uses: jenseng/dynamic-uses@v1
with:
# now you can use expressions 🥳
# uses: ${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/.github/actions/git/check-merge@${{ env.REF}}
uses: ${{ format('{0}/{1}/.github/actions/git/check-merge@{2}', env.ORG_NAME, env.REPO_NAME, env.REF) }}
# uses: ${{ vars.ORG_NAME }}/${{ vars.REPO_NAME }}/.github/actions/git/check-merge@${{ vars.REF}}
uses: ${{ format('{0}/{1}/.github/actions/git/check-merge@{2}', vars.ORG_NAME, vars.REPO_NAME, vars.REF) }}
# # the `with` needs to be converted to a valid json string
# with: '{ "node-version": 18 }'

# - name: check if PR is merged
# uses: ${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/.github/actions/git/check-merge@${{ env.REF}}
# uses: ${{ vars.ORG_NAME }}/${{ vars.REPO_NAME }}/.github/actions/git/check-merge@${{ vars.REF}}

# - name: Call another action
# uses: ${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/.github/actions/python/pytest@feature/gha
# uses: ${{ vars.ORG_NAME }}/${{ vars.REPO_NAME }}/.github/actions/python/pytest@feature/gha
# with:
# requirements_file: ./poc/pytest/requirements.txt
# check2:
# name: Call reusable workflow
# uses: ${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/.github/workflows/ci-pytest.yaml@feature/gha
# uses: ${{ vars.ORG_NAME }}/${{ vars.REPO_NAME }}/.github/workflows/ci-pytest.yaml@feature/gha

0 comments on commit 76dc48f

Please sign in to comment.