From b5cdb7f72e3ac9755d43e6577b6c7be0e4bbcd5c Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 25 Mar 2024 08:58:22 -0700 Subject: [PATCH] feat: use the local supersetbot (#27615) --- .github/actions/setup-supersetbot/action.yml | 11 +++++++++++ .github/workflows/docker-release.yml | 8 +++++++- .github/workflows/docker.yml | 6 +++--- .github/workflows/issue_creation.yml | 8 +++++++- .github/workflows/supersetbot.yml | 8 +++++++- 5 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 .github/actions/setup-supersetbot/action.yml diff --git a/.github/actions/setup-supersetbot/action.yml b/.github/actions/setup-supersetbot/action.yml new file mode 100644 index 0000000000000..155af26c08e45 --- /dev/null +++ b/.github/actions/setup-supersetbot/action.yml @@ -0,0 +1,11 @@ +name: 'Setup supersetbot' +description: 'Sets up supersetbot npm lib from the repo' +runs: + using: 'composite' + steps: + - name: Install dependencies + shell: bash + run: | + cd .github/supersetbot + npm install + npm link diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 3d51c75f8fd7f..9918d8ee094fb 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -55,7 +55,13 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - - run: npm install -g supersetbot + + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v4 + + - name: Setup supersetbot + uses: ./.github/actions/setup-supersetbot/ + - name: Execute custom Node.js script env: DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 93259061ec566..e41caf788806a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,15 +56,15 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - - name: install supersetbot - run: | - npm install -g supersetbot - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v4 with: persist-credentials: false + - name: Setup supersetbot + uses: ./.github/actions/setup-supersetbot/ + - name: Build Docker Image shell: bash run: | diff --git a/.github/workflows/issue_creation.yml b/.github/workflows/issue_creation.yml index 930b1cf7a7e03..8bc6d25ab13fa 100644 --- a/.github/workflows/issue_creation.yml +++ b/.github/workflows/issue_creation.yml @@ -15,7 +15,13 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - - run: npm install -g supersetbot + + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v4 + + - name: Setup supersetbot + uses: ./.github/actions/setup-supersetbot/ + - name: Execute custom Node.js script env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/supersetbot.yml b/.github/workflows/supersetbot.yml index 327e5be58627d..f336629676b11 100644 --- a/.github/workflows/supersetbot.yml +++ b/.github/workflows/supersetbot.yml @@ -35,7 +35,13 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - - run: npm install supersetbot + + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v4 + + - name: Setup supersetbot + uses: ./.github/actions/setup-supersetbot/ + - name: Execute custom Node.js script env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}