Create blank.yml #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Example Workflow with Secret | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| example-job: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| MY_SECRET: ${{ secrets.MY_SECRET }} # 使用 GitHub Secret | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
| - name: Print secret (caution: avoid printing secrets in real-world use) | ||
| run: echo "My secret is $MY_SECRET" # 在脚本中使用 GitHub Secret | ||