Skip to content

E2E reset

E2E reset #419

Workflow file for this run

on:
schedule:
- cron: '0 18 * * *' # runs every day at 6PM UTC
workflow_dispatch:
name: E2E reset
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
e2e:
name: E2E reset
runs-on: namespace-profile-sdk
steps:
- name: Setup 1Password
uses: 1password/load-secrets-action/configure@8d0d610af187e78a2772c2d18d627f4c52d3fbfb # v3
with:
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Load secrets
uses: 1password/load-secrets-action@8d0d610af187e78a2772c2d18d627f4c52d3fbfb # v3
with:
export-env: true
env:
E2E_GITHUB_TOKEN: "op://platform/SDK E2E/github-token"
SETTLEMINT_ACCESS_TOKEN_E2E_TESTS: "op://platform/SDK E2E/pat-token"
SETTLEMINT_INSTANCE: "op://platform/SDK E2E/instance"
- name: Checkout repository
uses: namespacelabs/nscloud-checkout-action@0c5e6ce59a41299aba2ad91baa0126f1bfde8e5c # v8
- name: Login to SettleMint and delete workspace
uses: settlemint/settlemint-action@main
if: ${{ env.SETTLEMINT_WORKSPACE != '' }}
env:
SETTLEMINT_WORKSPACE: ${{ secrets.SETTLEMINT_WORKSPACE }}
with:
instance: ${{ env.SETTLEMINT_INSTANCE }}
access-token: ${{ env.SETTLEMINT_ACCESS_TOKEN_E2E_TESTS }}
auto-connect: false
workspace: ${{ secrets.SETTLEMINT_WORKSPACE }}
command: platform delete workspace --accept-defaults --force default
- name: Delete all secrets
run: |
echo $E2E_GITHUB_TOKEN | gh auth login --with-token
gh secret list | while read -r secret _; do
gh secret delete "$secret"
done
env:
E2E_GITHUB_TOKEN: ${{ env.E2E_GITHUB_TOKEN }}