【发布时间】:2021-11-01 13:03:55
【问题描述】:
当 PR 打开时,我正在运行 github 操作。这工作正常。我的问题是,如果they failed in their earlier execution due to any errors.
简而言之,如果我对上一个错误进行修复,我想再次运行 github 操作。目前,如果我提交修复,则不会触发 github 操作。
name: Node.js CI
on:
push:
branches: [main]
pull_request:
types: [opened]
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.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 }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: serverless deploy
if: ${{github.event_name=='push'}}
uses: serverless/github-action@master
with:
args: deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
【问题讨论】:
标签: github continuous-integration github-actions