diff --git a/.github/workflows/00a-basic-filters.yml b/.github/workflows/00a-basic-filters.yml index 003e0b4..d4fe498 100644 --- a/.github/workflows/00a-basic-filters.yml +++ b/.github/workflows/00a-basic-filters.yml @@ -18,9 +18,9 @@ on: - '**.js' pull_request: branches: [ main ] - schedule: + # schedule: # * is a special character in YAML so you have to quote this string - - cron: '30 5,17 * * *' + # - cron: '30 5,17 * * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/06-expressions.yml b/.github/workflows/06-expressions.yml index da3cbc6..77f13d9 100644 --- a/.github/workflows/06-expressions.yml +++ b/.github/workflows/06-expressions.yml @@ -1,7 +1,8 @@ # This is a basic workflow to help you get started with Actions - name: 06 Expressions +# https://docs.github.com/en/actions/learn-github-actions/expressions + # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch diff --git a/.github/workflows/07-contexts.yml b/.github/workflows/07-contexts.yml index 62e223f..615a06f 100644 --- a/.github/workflows/07-contexts.yml +++ b/.github/workflows/07-contexts.yml @@ -1,6 +1,8 @@ name: 07 Contexts on: push +# https://docs.github.com/en/actions/learn-github-actions/contexts + jobs: dump_contexts_to_log: runs-on: ubuntu-latest diff --git a/.github/workflows/07b-vars.yml b/.github/workflows/07b-vars.yml new file mode 100644 index 0000000..22b459d --- /dev/null +++ b/.github/workflows/07b-vars.yml @@ -0,0 +1,27 @@ +on: + workflow_dispatch: +env: + # Setting an environment variable with the value of a configuration variable + env_var: ${{ vars.ENV_CONTEXT_VAR }} + +jobs: + display-variables: + name: ${{ vars.JOB_NAME }} + # You can use configuration variables with the `vars` context for dynamic jobs + if: ${{ vars.USE_VARIABLES == 'true' }} + runs-on: ${{ vars.RUNNER }} + environment: ${{ vars.ENVIRONMENT_STAGE }} + steps: + - name: Use variables + run: | + echo "repository variable : ${{ vars.REPOSITORY_VAR }}" + echo "organization variable : ${{ vars.ORGANIZATION_VAR }} (if I had one :) )" + echo "overridden variable : ${{ vars.OVERRIDE_VAR }}" + echo "variable from shell environment : $env_var" + + - name: ${{ vars.HELLO_WORLD_STEP }} + if: ${{ vars.HELLO_WORLD_ENABLED == 'true' }} + uses: actions/hello-world-javascript-action@main + with: + who-to-greet: ${{ vars.GREET_NAME }} + \ No newline at end of file