diff --git a/.github/workflows/blank-1.yml b/.github/workflows/blank-1.yml index 01502b1..bc00237 100644 --- a/.github/workflows/blank-1.yml +++ b/.github/workflows/blank-1.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: CI-1 # Controls when the workflow will run on: @@ -13,6 +13,10 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +permissions: + actions: write + contents: read + # 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" @@ -34,3 +38,9 @@ jobs: run: | echo Add other actions to build, echo test, and deploy your project. + + - name: trigger other workflow + env: + GH_TOKEN: ${{ github.token }} + run: + gh workflow run blank-2.yml -R ${{ github.repository }} diff --git a/.github/workflows/blank-2.yml b/.github/workflows/blank-2.yml index 01502b1..980c18f 100644 --- a/.github/workflows/blank-2.yml +++ b/.github/workflows/blank-2.yml @@ -1,14 +1,9 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: CI-2 # Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the "main" branch - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: