Skip to content

feat(contract): add javascript validation #37

feat(contract): add javascript validation

feat(contract): add javascript validation #37

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: 🌳 Pull Request
on:
pull_request_target:
pull_request:
types:
- closed
jobs:
# To use this job, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
label:
name: 🏷️ Label
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
permissions:
contents: read
pull-requests: write
steps:
# https://github.com/actions/labeler/tree/8558fd74291d67161a8a78ce36a881fa63b766a9
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9
with:
sync-labels: true
cleanup-cache:
name: 🧹 Cleanup cache
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed'
permissions:
# `actions:write` permission is required to delete caches
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
actions: write
contents: read
steps:
# https://github.com/actions/checkout/tree/11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: 🗑️ Delete cache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ github.token }}