Skip to content

Commit

Permalink
feat: add new variable TAIGA_FAMILY_BOT_IS_AUTHOR
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Aug 31, 2023
1 parent d969132 commit 03dadac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.actor == 'taiga-family-bot' && contains(github.head_ref, 'renovate/')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.6.0
- uses: ./actions/variables
- uses: ./actions/two-approve
if: env.TAIGA_FAMILY_BOT_IS_AUTHOR == 'true'
with:
token1: ${{ secrets.GITHUB_TOKEN }}
token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
pull-requests: write
if: contains(github.head_ref, 'release/')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.6.0
- uses: taiga-family/ci/actions/two-approve@1.3.0
with:
token1: ${{ secrets.APPROVER1_TOKEN }}
Expand All @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.6.0
- uses: taiga-family/ci/actions/variables@1.3.0
```
Expand All @@ -42,6 +42,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.6.0
- uses: taiga-family/ci/actions/setup-node@1.3.0
```
2 changes: 2 additions & 0 deletions actions/variables/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ runs:
export SNAPSHOTS_CACHE_KEY="e2e-cache--${{ github.event.pull_request.head.sha || github.sha }}-${{ github.event.number }}"
export CYPRESS_SNAPSHOTS_ARTIFACTS_KEY="cypress-e2e-artifacts--${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_id }}-${{ github.event.number }}"
export PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY="playwright-e2e-artifacts--${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_id }}-${{ github.event.number }}"
export TAIGA_FAMILY_BOT_IS_AUTHOR="${{ github.actor == 'taiga-family-bot' && (contains(github.head_ref, 'release/') || contains(github.head_ref, 'renovate/')) }}"
if [[ "$IS_FORK" == "false" && "$IS_DEPENDABOT" == "false" ]]; then
export IS_OWNER_MODE="true"
Expand Down Expand Up @@ -78,3 +79,4 @@ runs:
echo "CYPRESS_SNAPSHOTS_ARTIFACTS_KEY=$CYPRESS_SNAPSHOTS_ARTIFACTS_KEY" >> $GITHUB_ENV
echo "PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY=$PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY" >> $GITHUB_ENV
echo "SNAPSHOTS_CACHE_KEY=$SNAPSHOTS_CACHE_KEY" >> $GITHUB_ENV
echo "TAIGA_FAMILY_BOT_IS_AUTHOR=$TAIGA_FAMILY_BOT_IS_AUTHOR" >> $GITHUB_ENV

0 comments on commit 03dadac

Please sign in to comment.