mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-19 07:21:16 +00:00
Fix GitHub Actions nightly workflow
This commit is contained in:
2
.github/workflows/linting.yml
vendored
2
.github/workflows/linting.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
job: [gen-dockerfiles]
|
job: [gen-dockerfiles]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
- name: Diff generated Docker files
|
- name: Diff generated Docker files
|
||||||
run: |
|
run: |
|
||||||
make "${JOB}"
|
make "${JOB}"
|
||||||
|
|||||||
19
.github/workflows/php-ci.yml
vendored
19
.github/workflows/php-ci.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
fail-fast: False
|
fail-fast: False
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Show environment
|
- name: Show environment
|
||||||
run: |
|
run: |
|
||||||
@@ -91,18 +91,19 @@ jobs:
|
|||||||
- name: Set variables
|
- name: Set variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
# Set git branch or git tag as slug
|
# Detached from branch
|
||||||
if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then
|
if [ "$( git rev-parse --abbrev-ref HEAD )" = "HEAD" ]; then
|
||||||
GIT_TYPE=TAG
|
GIT_TYPE=TAG
|
||||||
GIT_SLUG="${GITHUB_REF/refs\/tags\//}"
|
GIT_SLUG="$( git tag --points-at HEAD | head -1 )"
|
||||||
else
|
else
|
||||||
GIT_TYPE=BRANCH
|
GIT_TYPE=BRANCH
|
||||||
if [ -n "${GITHUB_HEAD_REF}" ]; then
|
GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )"
|
||||||
GIT_SLUG="${GITHUB_HEAD_REF}"
|
|
||||||
else
|
|
||||||
GIT_SLUG="${GITHUB_REF/refs\/heads\//}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Output
|
||||||
|
echo "GIT_TYPE=${GIT_TYPE}"
|
||||||
|
echo "GIT_SLUG=${GIT_SLUG}"
|
||||||
|
|
||||||
# Export variable
|
# Export variable
|
||||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
||||||
echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV
|
echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV
|
||||||
|
|||||||
19
.github/workflows/php-nightly.yml
vendored
19
.github/workflows/php-nightly.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
fail-fast: False
|
fail-fast: False
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Show environment
|
- name: Show environment
|
||||||
run: |
|
run: |
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
- '8.1'
|
- '8.1'
|
||||||
refs:
|
refs:
|
||||||
- 'master'
|
- 'master'
|
||||||
- '0.114'
|
- '0.118'
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
@@ -97,16 +97,19 @@ jobs:
|
|||||||
- name: Set variables
|
- name: Set variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
# Set git branch or git tag as slug
|
# Detached from branch
|
||||||
if [ -n "$( git tag --points-at HEAD )" ]; then
|
if [ "$( git rev-parse --abbrev-ref HEAD )" = "HEAD" ]; then
|
||||||
GIT_TYPE=TAG
|
GIT_TYPE=TAG
|
||||||
GIT_SLUG="$( git tag --points-at HEAD )"
|
GIT_SLUG="$( git tag --points-at HEAD | head -1 )"
|
||||||
elif [ "$( git rev-parse --abbrev-ref HEAD )" != "HEAD" ]; then
|
else
|
||||||
GIT_TYPE=BRANCH
|
GIT_TYPE=BRANCH
|
||||||
GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )"
|
GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )"
|
||||||
else
|
|
||||||
false
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Output
|
||||||
|
echo "GIT_TYPE=${GIT_TYPE}"
|
||||||
|
echo "GIT_SLUG=${GIT_SLUG}"
|
||||||
|
|
||||||
# Export variable
|
# Export variable
|
||||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
||||||
echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV
|
echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV
|
||||||
|
|||||||
Reference in New Issue
Block a user