1
0
mirror of synced 2025-12-30 12:02:01 -05:00
Commit Graph

77 Commits

Author SHA1 Message Date
Martin Lopes
09c77faaa1 Update workflow-commands-for-github-actions.md 2022-03-21 11:19:54 +10:00
Martin Lopes
f24a5cb1eb Update workflow-commands-for-github-actions.md 2022-03-21 11:04:34 +10:00
Martin Lopes
57c4680555 Merge branch 'main' into pwsh-commands 2022-03-21 10:29:34 +10:00
Brendon Smith
06cf952123 Document how to use secrets with if: conditionals in GitHub Actions workflows (#12722)
* 🔒 Document how to use secrets with `if:`

github/docs#6861
github/docs#12722

- Add a complete workflow example to `jobs.<job_id>.steps[*].if`,
  demonstrating how to skip a step if a secret is not present
- Add an explanation to "Using encrypted secrets in a workflow"
- Cross-reference the two pages

* 🔒 Compare secrets with empty strings in `if:`

github/docs#6861
https://github.com/github/docs/pull/12722#discussion_r801011000

Rather than referencing two secrets:

1. `${{ secrets.SECRET_IS_SET }}`
2. `${{ secrets.SECRET_IS_NOT_SET }}`)

This commit will update the related section of the docs to reference a
single secret (`${{ secrets.SECRET_IS_SET }}`), and will update the
`if:` conditionals to compare with empty strings as suggested.

* 🔒 Add missing `{% raw %}`/`{% endraw %}`

github/docs#6861
github/docs#12722

Some `${{ }}` values were converted to `$` in the preview environment.
Adding `{% raw %}`/`{% endraw %}` will preserve the raw value.

* 🔒 Match variable and secret names in examples

github/docs#6861
https://github.com/github/docs/pull/12722#discussion_r801011000

This PR adds an example of how to use secrets with `if:` conditionals.
The reviewer suggested comparing variable values with empty strings to
make the `if:` conditionals clearer.

Commit cecdf00 updated the secret names accordingly, but the names of
the secret and environment variable may still have been confusing.

This commit will update the secret and environment variable names to
match the cross-referenced example on the "Encrypted secrets" page.

* Update content/actions/using-workflows/workflow-syntax-for-github-actions.md

Co-authored-by: hubwriter <hubwriter@github.com>
2022-03-18 14:20:40 +00:00
Martin Lopes
63978b65ee Update workflow-commands-for-github-actions.md 2022-03-18 09:33:40 +10:00
Martin Lopes
9176a26a56 Merge branch 'main' into pwsh-commands 2022-03-17 17:19:26 +10:00
Lucas Costi
cfba19d927 Add cache section for Actions REST API (#24924)
* Add cache section for Actions REST API

* Add permissions entries, cache section

* Add new cache directory after REST reactify changes

* Update content/actions/using-workflows/caching-dependencies-to-speed-up-workflows.md

Co-authored-by: Martin Lopes <martin389@github.com>

* Add versioning for GHES/AE

Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
2022-03-16 10:37:19 +00:00
Jenni Christensen
fa2d1c17d6 Merge branch 'main' into dihydroJen-1 2022-03-15 17:13:08 -07:00
Jesse Houwing
3d1de14fc6 Update workflow-commands-for-github-actions.md 2022-03-11 14:06:03 +01:00
Sarah Edwards
a1aad9333b Restrict workflow access to runner groups (#25463) 2022-03-10 11:10:19 -08:00
Martin Lopes
ae88a1b0af Update workflow-commands-for-github-actions.md 2022-03-07 14:02:22 +10:00
Martin Lopes
e40ef8cb0c Merge branch 'main' into pwsh-commands 2022-03-04 13:12:00 +10:00
Martin Lopes
266e547344 Update workflow-commands-for-github-actions.md 2022-03-04 13:05:21 +10:00
Martin Lopes
17ac762d7a Switched to uuidgen, added clearer example messages 2022-03-04 12:46:11 +10:00
Jonathan Tamsut
d04e4046ae bump version for upload-artifact and download-artifact code snippets (#25782) 2022-03-04 10:17:09 +10:00
Martin Lopes
a6fd2cc895 Merge branch 'main' into pwsh-commands 2022-03-04 08:25:12 +10:00
Octomerger Bot
f86f9878b8 Merge branch 'main' into repo-sync 2022-03-03 12:49:30 -08:00
Robert Sese
79c48070c4 Deprecate 3.0 (#25646)
* Deprecate 3.0

* 3.0 deprecation: remove 3.0 markup (#25647)

* Remove liquid conditionals and content for 3.0 deprecation

* Remove manually, no longer versioned in a supported version

* Remove translations manually, no longer versioned in a supported version

* Remove 'if', now in all supported versions

* Remove dangling 'elseif', now in all supported versions

* Remove dangling 'elseif' and 3.0 screenshot reference, now in all supported versions

* Nudge to latest supported GHES version

* Nudge to latest supported release GHES version

* Bump all the version for the liquid tests

* Bump first deprecated version for linting tests

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Prefer double quotes

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Remove extra newline

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Remove extra newline

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Remove extra newline

Co-authored-by: Laura Coursen <lecoursen@github.com>

* One reusable per line

Co-authored-by: Laura Coursen <lecoursen@github.com>

* One reusable per line

Co-authored-by: Laura Coursen <lecoursen@github.com>

* One reusable per line

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Stray whitespace ✂️

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Version check not needed anymore

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Just 'ghes' since we're deprecating 3.0

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Don't depend on hardcoded versions

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Remove static files for 3.0 deprecation (#25649)

Co-authored-by: Laura Coursen <lecoursen@github.com>
2022-03-03 13:08:24 -06:00
Laura Coursen
bc60b86d02 Merge branch 'main' into patch-3 2022-03-03 12:47:12 -06:00
Laura Coursen
b78f3eca16 Add 💅 2022-03-03 12:46:37 -06:00
Martin Lopes
499f36e3aa Merge branch 'main' into pwsh-commands 2022-03-03 16:35:30 +10:00
Martin Lopes
53a274d3c2 Added tool picker options for powershell and bash 2022-03-03 15:35:41 +10:00
Flash Sheridan
731094795c rm suggestion about non-Bash shell
…and complex manipulation of variables.

Co-authored-by: Edward Thomson <ethomson@github.com>
2022-03-02 19:45:36 -05:00
Ramya Parimi
4b3f6adc70 Merge branch 'main' into patch-2 2022-03-02 06:38:13 -06:00
Sarah Edwards
f93315f61a Add example of a conditional based on event type (#25626)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
2022-03-01 18:05:53 +00:00
Sophie
c9258a8498 Merge branch 'main' into sophie-5758 2022-02-25 16:01:19 +01:00
Sophie
50c0b2d0b0 Removed duplicate actions reusable folder 2022-02-25 15:51:14 +01:00
Jesse Houwing
bb554793a8 Example was using ubuntu-latest for pwsh 2022-02-25 14:52:19 +01:00
Jesse Houwing
54b53009af 1 Typo! one! ONE! ARGH! 2022-02-25 14:36:27 +01:00
Jesse Houwing
1a7217b879 Update workflow-commands-for-github-actions.md 2022-02-25 13:28:09 +01:00
Martin Lopes
53947436d3 Reformatted codeblocks 2022-02-25 13:44:33 +10:00
Martin Lopes
b1226f1793 Merge branch 'main' into pwsh-commands 2022-02-25 10:59:11 +10:00
Jenni Christensen
235497a200 Added a link to the section on the GITHUB_TOKEN 2022-02-24 09:30:49 -08:00
Jenni Christensen
9fa8064a4f Merge branch 'main' into dihydroJen-1 2022-02-24 09:20:57 -08:00
Jenni Christensen
07a39ba4a3 Added GitHub Token expiration information 2022-02-24 09:09:14 -08:00
Sarah Edwards
1b22582c91 add example for PR merged workflow (#25594) 2022-02-24 16:18:29 +00:00
Martin Lopes
0a20a042df Merge branch 'main' into pwsh-commands 2022-02-23 13:29:56 +10:00
mc
a9bb8cbfd5 [Ready for merging on Feb 22] - GHAS starter workflows (#24873)
* empty commit

* document starter workflows

* adds procedural and removes availability section

* more work

* update actions docs

* added versioning that disappeared mysteriously

* remove spurious emtpy line

* remove unused endif?

* having fun with versioning

* hmm versioning hmm

* finally fix versioning

* add missing full stop

* start addressing comments

* address more comments

* address further comments

* Update content/get-started/learning-about-github/about-github-advanced-security.md

Co-authored-by: Felicity Chapman <felicitymay@github.com>

* add everything to the same paragraph

* remove CodeQL section

* Optimize images

* add note + content to GitHub Actions articles

* address review comments

Co-authored-by: Jules Parker <19994093+jules-p@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
2022-02-22 17:16:40 +00:00
Anthony
3818b30787 Adds condition for reusable workflow access to self-hosted runners (#25478)
Co-authored-by: hubwriter <hubwriter@github.com>
2022-02-22 15:14:49 +00:00
Flash Sheridan
10c25fee3c Add warning about env vars defined via others
Note that variables in the `env` map cannot be defined in terms of other variables in the map.
2022-02-18 16:17:11 -05:00
Martin Lopes
1e43c78e38 Merge branch 'main' into pwsh-commands 2022-02-16 17:18:17 +10:00
Martin Lopes
06fe80deee Remove the "Advanced guides" category (#25359) 2022-02-16 10:54:45 +10:00
Vanessa
4b8b75e337 GitHub Enterprise Server 3.4 release candidate (#24754)
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Vanessa <vgrl@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Lars Schneider <larsxschneider@github.com>
Co-authored-by: Jared Murrell <primetheus@github.com>
Co-authored-by: Jules Parker <19994093+jules-p@users.noreply.github.com>
Co-authored-by: Docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Sarita Iyer <saritai@github.com>
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
Co-authored-by: Steve Guntrip <stevecat@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
Co-authored-by: Lars Schneider <larsxschneider@github.com>
Co-authored-by: Jared Murrell <primetheus@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
2022-02-15 13:40:37 -05:00
Martin Lopes
2669552744 Update workflow-commands-for-github-actions.md 2022-02-15 11:57:01 +10:00
Darren Reid
c9186d07c3 Use valid reusable workflow paths in example yml
The docs currently state:

> Reusable workflows are YAML-formatted files, very similar to any other workflow file. As with other workflow files, you locate reusable workflows in the `.github/workflows` directory of a repository. Subdirectories of the `workflows` directory are not supported.

But the example yml then presents the path `uses: ./.github/actions/my-action` which doesn't follow the initial advice about location of workflow files.

Change is to use `uses: ./.github/workflows/my-action` to make example valid, but this is assuming the `Creating a reusable workflow` section is also accurate.
2022-02-15 10:57:52 +11:00
Martin Lopes
6a7b034587 Merge branch 'main' into pwsh-commands 2022-02-14 15:55:56 +10:00
Martin Lopes
e5af39e51a Update workflow-commands-for-github-actions.md 2022-02-14 15:17:56 +10:00
Martin Lopes
97265eeaf0 Small updates 2022-02-14 12:39:12 +10:00
Martin Lopes
76051b0e62 Testing presentation options 2022-02-14 12:31:35 +10:00
Jesse Houwing
bc371b6c41 Corrected snippet type 2022-02-11 17:27:29 +01:00