Compare commits

..

2 Commits
4.0.0 ... 4.0.1

Author SHA1 Message Date
rlespinasse
cd9871b66e fix(short): populate GITHUB_SHA_SHORT correctly 2022-03-19 11:35:00 +01:00
Romain Lespinasse
1fb0eeb01e docs(readme): reword troubleshooting section 2022-01-01 15:15:35 +01:00
3 changed files with 48 additions and 18 deletions

View File

@@ -7,12 +7,9 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
concurrency:
group: os-testing-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Load using v3.x
uses: rlespinasse/github-slug-action@v3.x
- name: Load using v4.x with prefix
@@ -107,20 +104,50 @@ jobs:
[[ "${{ env.GITHUB_REF_NAME_SLUG_CS }}" == "${{ env.V4_GITHUB_REF_NAME_SLUG_CS }}" ]]
[[ "${{ env.GITHUB_REF_NAME_SLUG_URL_CS }}" == "${{ env.V4_GITHUB_REF_NAME_SLUG_URL_CS }}" ]]
shell: bash
- name: Print // Short SHA variables
- name: Validate // Short SHA variables
run: |
echo "sha : ${{ env.V4_GITHUB_SHA_SHORT }}"
echo "pull request sha : ${{ env.V4_GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}"
[[ "${{ env.GITHUB_SHA_SHORT }}" == "${{ env.V4_GITHUB_SHA_SHORT }}" ]]
[[ "${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}" == "${{ env.V4_GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}" ]]
shell: bash
os-testing-without-checkout:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: this-action
ref: ${{ github.ref }}
- name: Load using v3.x
uses: rlespinasse/github-slug-action@v3.x
- name: Load using v4.x with prefix
uses: ./this-action
with:
prefix: V4_
- name: Validate // Short SHA variables
run: |
echo "sha : ${{ env.V4_GITHUB_SHA_SHORT }}"
echo "pull request sha : ${{ env.V4_GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}"
[[ "${{ env.GITHUB_SHA_SHORT }}" == "${{ env.V4_GITHUB_SHA_SHORT }}" ]]
[[ "${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}" == "${{ env.V4_GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}" ]]
shell: bash
release:
runs-on: ubuntu-latest
concurrency:
group: release-${{ github.ref }}-${{ github.event_name }}
needs: os-testing
needs:
- os-testing
- os-testing-without-checkout
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Release this GitHub Action
uses: rlespinasse/release-that@v1
with:

View File

@@ -161,18 +161,19 @@ jobs:
### An action could not be found at the URI
If your workflow fail on the `Set up job` task with this kind of log :
If your workflow fail on the `Set up job` task with this kind of log
```text
Download action repository 'rlespinasse/github-slug-action@master'
##[error]An action could not be found at the URI 'https://api.github.com/repos/rlespinasse/github-slug-action/tarball/master'
Download action repository 'rlespinasse/github-slug-action@GIT_REFERENCE'
##[error]An action could not be found at the URI 'https://api.github.com/repos/rlespinasse/github-slug-action/tarball/GIT_REFERENCE'
```
> The master branch doesn't exists anymore.
>
> The master branch EOL has been set to **2020-10-25** after a 6-month deprecation period (more information on the [EOL issue][issue-15])
If the `GIT_REFERENCE` value is
Please, use the current branch tag `v4`, branch `v4.x` or a version tag (see [releases pages][releases]) in order to fix your workflow.
- `v4.x` or after, the branch don't exists anymore following the [end-of-life for a branch](SECURITY.md#end-of-life-of-a-branch) security process.
- `master`, the branch don't exists anymore, read more about it on the corresponding issue ([EOL issue][issue-15])
Please, use the current major tag `v4` or a version tag (see [releases pages][releases]) in order to fix your workflow.
## Thanks for talking about us

View File

@@ -64,14 +64,16 @@ runs:
prefix: ${{ inputs.prefix }}
# Short
- uses: rlespinasse/shortify-git-revision@v1.3.0
- uses: rlespinasse/shortify-git-revision@v1.4.0
with:
name: GITHUB_SHA
continue-on-error: true
short-on-error: true
length: 8
prefix: ${{ inputs.prefix }}
- uses: rlespinasse/shortify-git-revision@v1.3.0
- uses: rlespinasse/shortify-git-revision@v1.4.0
with:
name: GITHUB_EVENT_PULL_REQUEST_HEAD_SHA
revision: ${{ github.event.pull_request.head.sha }}
continue-on-error: true
short-on-error: true
length: 8
prefix: ${{ inputs.prefix }}