Skip to content

Create blank.yml

Create blank.yml #1

Workflow file for this run

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)

Check failure on line 18 in .github/workflows/blank.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/blank.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
run: echo "My secret is $MY_SECRET" # 在脚本中使用 GitHub Secret