diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml deleted file mode 100644 index 56fbd040..00000000 --- a/.github/workflows/cron.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Run every 5 minutes - -on: - schedule: - - cron: "*/5 * * * *" - -jobs: - cron: - name: Run every 5 minutes - runs-on: ubuntu-latest - - steps: - - name: Hello World - run: echo "Hello World" diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml new file mode 100644 index 00000000..f2b276d7 --- /dev/null +++ b/.github/workflows/secrets.yml @@ -0,0 +1,27 @@ +name: Secrets workflow + +on: + pull_request: + branches: ["main"] + +env: + API_CSPROJ_PATH: "./src/GithubActionsDotnet.Api/GithubActionsDotnet.Api.csproj" + +jobs: + secrets: + name: Secrets Demo + runs-on: ubuntu-latest + env: + JOB_NAME: "secrets" + steps: + - name: Echo environment variable + run: curl -h API_KEY + + new_job: + name: Secrets Demo + runs-on: ubuntu-latest + env: + JOB_NAME: "new_job" + steps: + - name: Echo environment variable + run: echo "The value of $JOB_NAME is $API_CSPROJ_PATH"