diff --git a/.github/actions/setup-supersetbot/action.yml b/.github/actions/setup-supersetbot/action.yml new file mode 100644 index 0000000000..155af26c08 --- /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 3d51c75f8f..9918d8ee09 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 93259061ec..e41caf7888 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 930b1cf7a7..8bc6d25ab1 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 327e5be586..f336629676 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 }}