Skip to content

🏷️ Override Bitbucket Cloud's schema to create new branches #119

🏷️ Override Bitbucket Cloud's schema to create new branches

🏷️ Override Bitbucket Cloud's schema to create new branches #119

Workflow file for this run

name: Node.js CI
on:
merge_group:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- name: Install Twingate
run: |
echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | sudo tee /etc/apt/sources.list.d/twingate.list
sudo apt update -yq
sudo apt install -yq twingate
- name: Setup and start Twingate
env:
TWINGATE_SERVICE_KEY: ${{ secrets.TWINGATE_SCM_TOOLS_SERVICE_KEY }}
run: |
echo $TWINGATE_SERVICE_KEY | sudo twingate setup --headless=-
sudo twingate start
- name: Twingate status
run: twingate status
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm run build --noEmit
- run: pnpm run lint
- run: pnpm run test
if: github.actor != 'dependabot[bot]'
env:
BITBUCKET_CLOUD_USERNAME: ${{ secrets.BITBUCKET_CLOUD_USERNAME }}
BITBUCKET_CLOUD_APP_PASSWORD: ${{ secrets.BITBUCKET_CLOUD_APP_PASSWORD }}
BITBUCKET_SERVER_URL: ${{ secrets.BITBUCKET_SERVER_URL }}
BITBUCKET_SERVER_TOKEN: ${{ secrets.BITBUCKET_SERVER_TOKEN }}
BITBUCKET_SERVER_TEST_PROJECT_KEY: ${{ vars.BITBUCKET_SERVER_TEST_PROJECT_KEY }}
BITBUCKET_SERVER_TEST_PROJECT_NAME: ${{ vars.BITBUCKET_SERVER_TEST_PROJECT_NAME }}
fix:
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- test
if: failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: latest
- run: |
pnpm install --fix-lockfile --no-frozen-lockfile
git add .
- id: commit-lockfile
uses: qoomon/actions--create-commit@v1
with:
message: |
📌 pnpm install --fix-lockfile
[dependabot skip]
skip-empty: true
- run: |
pnpm run format
git add .
- id: commit-format
uses: qoomon/actions--create-commit@v1
with:
message: |
🎨 pnpm run format
[dependabot skip]
skip-empty: true
- run: |
pnpm run lint:fix
git add .
- id: commit-lint
uses: qoomon/actions--create-commit@v1
with:
message: |
🚨 pnpm run lint:fix
[dependabot skip]
skip-empty: true
- name: Push
if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit
run: |
eval `ssh-agent -s`
ssh-add - <<< "$DEPLOY_KEY_PRIVATE"
git push
env:
DEPLOY_KEY_PRIVATE: ${{ secrets.DEPLOY_KEY_PRIVATE }}