Skip to content

Chore(deps): Bump word-wrap from 1.2.3 to 1.2.4 #711

Chore(deps): Bump word-wrap from 1.2.3 to 1.2.4

Chore(deps): Bump word-wrap from 1.2.3 to 1.2.4 #711

Workflow file for this run

name: Delete Preview
on:
pull_request:
types:
- unlabeled
- closed
jobs:
remove_preview:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'preview') || github.event.label.name == 'preview'
steps:
- name: install pyyaml
run: |
pip install --user pyyaml packaging
- name: Install ipfs-cluster-ctl
run: |
wget https://dist.ipfs.io/ipfs-cluster-ctl/v1.0.0/ipfs-cluster-ctl_v1.0.0_linux-amd64.tar.gz
tar xvfz ipfs-cluster-ctl_v1.0.0_linux-amd64.tar.gz
- name: Find Previous WebApp Deployment
uses: peter-evans/find-comment@v2
id: fcwebapp
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: 'WebApp IPFS Hash: '
- name: Unpin Webapp
if: steps.fcwebapp.outputs.comment-id != 0
run: |
COMMENT='${{ steps.fcwebapp.outputs.comment-body }}'
IFS=" " read -ra array <<< "$COMMENT"
hash=${array[3]}
./ipfs-cluster-ctl/ipfs-cluster-ctl --basic-auth '${{ secrets.IPFS_BASIC_AUTH }}' --host '${{ secrets.IPFS_HOST }}' pin rm $hash
- name: Delete Comment
uses: actions/github-script@v6
if: steps.fcwebapp.outputs.comment-id != 0
with:
script: |
github.rest.issues.deleteComment({
comment_id: ${{ steps.fcwebapp.outputs.comment-id }},
owner: context.repo.owner,
repo: context.repo.repo,
})