我有一个存储库,其中包含多个目录,用于多个Go项目。是否有一种方法可以在多个工作目录上运行github actions,以便我不必使用冗余的yaml文件来运行github actions?为了自动化使用Golang进行错误检查,我目前有以下操作:
errcheck:
name: Errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
working-directory: ./app1
with:
run: errcheck
token: ${{ secrets.GITHUB_TOKEN }}
但我想要:
errcheck:
name: Errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
working-directory: [./app1, ./app2]
with:
run: errcheck
token: ${{ secrets.GITHUB_TOKEN }}