Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions #75

Open
xiaotiandada opened this issue Apr 7, 2021 · 0 comments
Open

Github Actions #75

xiaotiandada opened this issue Apr 7, 2021 · 0 comments

Comments

@xiaotiandada
Copy link
Owner

xiaotiandada commented Apr 7, 2021

http://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html

https://docs.github.com/cn/actions/quickstart

https://github.com/actions/starter-workflows/blob/7c29ac248118d9e004eb6776e22cadbca1dd524a/ci/node.js.yml 配置文件用了这个模版

https://docs.github.com/en/actions/reference/events-that-trigger-workflows 定时任务相关 定时在某个小时成功了,但是每分钟执行一次还没测试出来...

```* * * * *` runs every minute of every day.``

https://docs.github.com/en/actions/reference/encrypted-secrets 设置 secrets ${{ secrets.TOKEN }}

提交代码就可以自动执行

# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. 
on:
  schedule:
    - cron: '0 4 * * *'

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# 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
    
    strategy:
      matrix:
        node-version: [14.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
          
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm install
      - run: TOKEN=${{ secrets.TOKEN }} node ./dist/index.js
   
@xiaotiandada xiaotiandada changed the title 123123 async title May 28, 2021
@xiaotiandada xiaotiandada changed the title async title async title test May 28, 2021
@xiaotiandada xiaotiandada changed the title async title test Github Actions 教程 May 29, 2021
@xiaotiandada xiaotiandada changed the title Github Actions 教程 Github Actions May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant