mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-05-17 18:35:07 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d2c65418d | ||
|
|
f536765da4 | ||
|
|
72cfc4cb1f | ||
|
|
d678898ce5 | ||
|
|
f527ed6e85 |
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -21,3 +21,25 @@ jobs:
|
||||
@semantic-release/git@9.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
- name: Output
|
||||
run: |
|
||||
echo "Slug variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG }}"
|
||||
echo "Slug URL variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG_URL }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG_URL }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG_URL }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG_URL }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG_URL }}"
|
||||
echo "Short SHA variables"
|
||||
echo " sha : ${{ env.GITHUB_SHA_SHORT }}"
|
||||
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
||||
# [2.2.0](http://github.com/rlespinasse/github-slug-action/compare/2.1.1...2.2.0) (2021-04-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add version warning ([f536765](http://github.com/rlespinasse/github-slug-action/commit/f536765da448783f587c88e2c69f8f65b4e06541))
|
||||
|
||||
## [2.1.1](http://github.com/rlespinasse/github-slug-action/compare/2.1.0...2.1.1) (2020-10-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove set-env due to CVE fix ([d678898](http://github.com/rlespinasse/github-slug-action/commit/d678898ce55139d0005c35618747506fbeb2d1ed))
|
||||
|
||||
# [2.1.0](http://github.com/rlespinasse/github-slug-action/compare/2.0.0...2.1.0) (2020-07-28)
|
||||
|
||||
|
||||
|
||||
@@ -134,6 +134,13 @@ The master branch EOL is set on **2020-10-25** after a 6-month deprecation perio
|
||||
When using this action on Windows or Macos workflows, A `##[error]Container action is only supported on Linux` error can be see in your workflow logs.
|
||||
Currently, this action don't support a system other than Linux due to Github Action Limitation on `Container`-based action.
|
||||
|
||||
On the `v3.x` branch, this GitHub action have been rewrite to be able to run on Windows or Macos workflow.
|
||||
|
||||
```yaml
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
```
|
||||
|
||||
[1]: https://github.com/rlespinasse/github-slug-action/workflows/Build/badge.svg
|
||||
[2]: https://github.com/rlespinasse/github-slug-action/actions
|
||||
[3]: https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
|
||||
|
||||
@@ -39,17 +39,18 @@ get_event_keyvalue() {
|
||||
fi
|
||||
}
|
||||
|
||||
echo ::set-env name=GITHUB_REPOSITORY_SLUG::"$(slug "$GITHUB_REPOSITORY")"
|
||||
echo ::set-env name=GITHUB_REPOSITORY_SLUG_URL::"$(slug_url "$GITHUB_REPOSITORY")"
|
||||
{
|
||||
echo "GITHUB_REPOSITORY_SLUG=$(slug "$GITHUB_REPOSITORY")"
|
||||
echo "GITHUB_REPOSITORY_SLUG_URL=$(slug_url "$GITHUB_REPOSITORY")"
|
||||
echo "GITHUB_REF_SLUG=$(slug_ref "$GITHUB_REF")"
|
||||
echo "GITHUB_HEAD_REF_SLUG=$(slug_ref "$GITHUB_HEAD_REF")"
|
||||
echo "GITHUB_BASE_REF_SLUG=$(slug_ref "$GITHUB_BASE_REF")"
|
||||
echo "GITHUB_EVENT_REF_SLUG=$(slug_ref "$(get_event_keyvalue "ref")")"
|
||||
echo "GITHUB_REF_SLUG_URL=$(slug_url_ref "$GITHUB_REF")"
|
||||
echo "GITHUB_HEAD_REF_SLUG_URL=$(slug_url_ref "$GITHUB_HEAD_REF")"
|
||||
echo "GITHUB_BASE_REF_SLUG_URL=$(slug_url_ref "$GITHUB_BASE_REF")"
|
||||
echo "GITHUB_EVENT_REF_SLUG_URL=$(slug_url_ref "$(get_event_keyvalue "ref")")"
|
||||
echo "GITHUB_SHA_SHORT=$(short_sha "$GITHUB_SHA")"
|
||||
} >>"$GITHUB_ENV"
|
||||
|
||||
echo ::set-env name=GITHUB_REF_SLUG::"$(slug_ref "$GITHUB_REF")"
|
||||
echo ::set-env name=GITHUB_HEAD_REF_SLUG::"$(slug_ref "$GITHUB_HEAD_REF")"
|
||||
echo ::set-env name=GITHUB_BASE_REF_SLUG::"$(slug_ref "$GITHUB_BASE_REF")"
|
||||
echo ::set-env name=GITHUB_EVENT_REF_SLUG::"$(slug_ref "$(get_event_keyvalue "ref")")"
|
||||
|
||||
echo ::set-env name=GITHUB_REF_SLUG_URL::"$(slug_url_ref "$GITHUB_REF")"
|
||||
echo ::set-env name=GITHUB_HEAD_REF_SLUG_URL::"$(slug_url_ref "$GITHUB_HEAD_REF")"
|
||||
echo ::set-env name=GITHUB_BASE_REF_SLUG_URL::"$(slug_url_ref "$GITHUB_BASE_REF")"
|
||||
echo ::set-env name=GITHUB_EVENT_REF_SLUG_URL::"$(slug_url_ref "$(get_event_keyvalue "ref")")"
|
||||
|
||||
echo ::set-env name=GITHUB_SHA_SHORT::"$(short_sha "$GITHUB_SHA")"
|
||||
echo "::warning ::This version only support linux-based workflow, please use 'rlespinasse/github-slug-action@v3.x' instead"
|
||||
|
||||
Reference in New Issue
Block a user