From 098b990ff3f9bbae7cfea641fa2c4920f9276157 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 9 May 2023 17:58:51 +0500 Subject: [PATCH 1/2] ci --- .github/workflows/slack.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/slack.yml diff --git a/.github/workflows/slack.yml b/.github/workflows/slack.yml new file mode 100644 index 0000000..d53cd57 --- /dev/null +++ b/.github/workflows/slack.yml @@ -0,0 +1,37 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + pull_request: + branches: [ "main" ] + + + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm run build + + - name: Post to a Slack channel + id: slack + uses: slackapi/slack-github-action@v1.23.0 + with: + + channel-id: 'C01UUQL01KN' + slack-message: "GitHub build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} \ No newline at end of file From 91f8a2d56c05a0e7c074ea300fa8ea08b085b663 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 9 May 2023 18:00:28 +0500 Subject: [PATCH 2/2] test1 --- .github/workflows/slack.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slack.yml b/.github/workflows/slack.yml index d53cd57..efeb025 100644 --- a/.github/workflows/slack.yml +++ b/.github/workflows/slack.yml @@ -23,7 +23,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 12 + - run: npm install - run: npm run build - name: Post to a Slack channel