mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-21 16:31:15 +00:00
Fix SLUG and TYPE for GitHub Actions
This commit is contained in:
26
.github/workflows/php-ci.yml
vendored
26
.github/workflows/php-ci.yml
vendored
@@ -93,14 +93,24 @@ jobs:
|
|||||||
- name: Set variables
|
- name: Set variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
# Detached from branch
|
|
||||||
if [ "$( git rev-parse --abbrev-ref HEAD )" = "HEAD" ]; then
|
# Retrieve git info (tags, etc)
|
||||||
GIT_TYPE=TAG
|
git fetch --all
|
||||||
GIT_SLUG="$( git tag --points-at HEAD | head -1 )"
|
|
||||||
else
|
# BRANCH, TAG or COMMIT
|
||||||
GIT_TYPE=BRANCH
|
GIT_TYPE="$( \
|
||||||
GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )"
|
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||||
fi
|
| sh \
|
||||||
|
| grep '^GIT_TYPE' \
|
||||||
|
| sed 's|.*=||g' \
|
||||||
|
)"
|
||||||
|
# Branch name, Tag name or Commit Hash
|
||||||
|
GIT_SLUG="$( \
|
||||||
|
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||||
|
| sh \
|
||||||
|
| grep '^GIT_NAME' \
|
||||||
|
| sed 's|.*=||g' \
|
||||||
|
)"
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
echo "GIT_TYPE=${GIT_TYPE}"
|
echo "GIT_TYPE=${GIT_TYPE}"
|
||||||
|
|||||||
26
.github/workflows/php-nightly.yml
vendored
26
.github/workflows/php-nightly.yml
vendored
@@ -97,14 +97,24 @@ jobs:
|
|||||||
- name: Set variables
|
- name: Set variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
# Detached from branch
|
|
||||||
if [ "$( git rev-parse --abbrev-ref HEAD )" = "HEAD" ]; then
|
# Retrieve git info (tags, etc)
|
||||||
GIT_TYPE=TAG
|
git fetch --all
|
||||||
GIT_SLUG="$( git tag --points-at HEAD | head -1 )"
|
|
||||||
else
|
# BRANCH, TAG or COMMIT
|
||||||
GIT_TYPE=BRANCH
|
GIT_TYPE="$( \
|
||||||
GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )"
|
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||||
fi
|
| sh \
|
||||||
|
| grep '^GIT_TYPE' \
|
||||||
|
| sed 's|.*=||g' \
|
||||||
|
)"
|
||||||
|
# Branch name, Tag name or Commit Hash
|
||||||
|
GIT_SLUG="$( \
|
||||||
|
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||||
|
| sh \
|
||||||
|
| grep '^GIT_NAME' \
|
||||||
|
| sed 's|.*=||g' \
|
||||||
|
)"
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
echo "GIT_TYPE=${GIT_TYPE}"
|
echo "GIT_TYPE=${GIT_TYPE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user