Skip to content

Ops - Actions Updates #13

Ops - Actions Updates

Ops - Actions Updates #13

name: Cleanup Tesults Target
on:
pull_request:
types: [closed]
env:
NODEJS_VERSION: 18
TESULTS_API_TOKEN: ${{ secrets.TESULTS_API_TOKEN }}
jobs:
tesults_target_cleanup:
name: Cleanup Tesults Target
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup NodeJS SDK ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache: yarn
cache-dependency-path: yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
- name: Yarn Install
run: yarn install --mode=skip-build
# used to create/delete branch target
- name: Set Branch Name Environment Variable
run: |
# Short name for current branch. For PRs, use target branch (base ref)
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Delete Tesults Target
run: node ./.scripts/create-delete-branch-target.js delete