diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 3f204aa..a17141a 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -62,14 +62,11 @@ jobs: build: - name: "[ ${{ matrix.version }} ]" + name: "[ PHP-${{ matrix.version }} ]" runs-on: ubuntu-latest strategy: fail-fast: False matrix: - # Adding all targets and only run them if they exist. - # Prevents us from forgetting to update this in case - # we add new envs in terragrunt. version: - '5.2' - '5.3' @@ -88,7 +85,7 @@ jobs: # Checkout repository # ------------------------------------------------------------ - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Set variables id: vars @@ -105,7 +102,6 @@ jobs: GIT_SLUG="${GITHUB_REF/refs\/heads\//}" fi fi - # Export variable # # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env echo ::set-env name=GIT_TYPE::${GIT_TYPE} @@ -278,7 +274,6 @@ jobs: # ------------------------------------------------------------ # Push build artifacts # ------------------------------------------------------------ - # Only run this, if the PR was created by the repo owner - name: Publish images (only repo owner) run: | diff --git a/.github/workflows/php-nightly.yml b/.github/workflows/php-nightly.yml index 5cd1121..c10de93 100644 --- a/.github/workflows/php-nightly.yml +++ b/.github/workflows/php-nightly.yml @@ -62,14 +62,11 @@ jobs: build: - name: "[ ${{ matrix.version }} ]" + name: "[ PHP-${{ matrix.version }} (ref: ${{ matrix.refs }}) ]" runs-on: ubuntu-latest strategy: fail-fast: False matrix: - # Adding all targets and only run them if they exist. - # Prevents us from forgetting to update this in case - # we add new envs in terragrunt. version: - '5.2' - '5.3' @@ -82,30 +79,34 @@ jobs: - '7.3' - '7.4' - '8.0' + refs: + - 'master' + - '0.111' + - '0.112' steps: # ------------------------------------------------------------ # Checkout repository # ------------------------------------------------------------ - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ matrix.refs }} - name: Set variables id: vars run: | # Set git branch or git tag as slug - if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then + if [ -n "$( git tag --points-at HEAD )" ]; then GIT_TYPE=TAG - GIT_SLUG="${GITHUB_REF/refs\/tags\//}" - else + GIT SLUG="$( git tag --points-at HEAD )" + elif [ "$( git rev-parse --abbrev-ref HEAD )" != "HEAD" ]; then GIT_TYPE=BRANCH - if [ -n "${GITHUB_HEAD_REF}" ]; then - GIT_SLUG="${GITHUB_HEAD_REF}" - else - GIT_SLUG="${GITHUB_REF/refs\/heads\//}" - fi + GIT SLUG="$( git rev-parse --abbrev-ref HEAD )" + else + false fi - # Export variable # # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env echo ::set-env name=GIT_TYPE::${GIT_TYPE} @@ -278,7 +279,6 @@ jobs: # ------------------------------------------------------------ # Push build artifacts # ------------------------------------------------------------ - # Only run this, if the PR was created by the repo owner - name: Publish images (only repo owner) run: | diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml deleted file mode 100644 index 8bc7efc..0000000 --- a/.github/workflows/schedule.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- - -name: schedule - -on: - schedule: - - cron: '*/5 * * * *' - -jobs: - build: - name: "[ PHP-${{ matrix.version }} (ref: ${{ matrix.refs }}) ]" - runs-on: ubuntu-latest - strategy: - fail-fast: False - matrix: - version: - - '5.2' - - '5.3' - - '5.4' - - '5.5' - - '5.6' - - '7.0' - - '7.1' - - '7.2' - - '7.3' - - '7.4' - - '8.0' - refs: - - 'master' - - '0.110' - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ matrix.refs }} - - - name: Show git info - run: | - git branch - git log | head - - - name: Set variables - id: vars - run: | - if [ -n "$( git tag --points-at HEAD )" ]; then - GIT_TYPE=TAG - GIT_SLUG="$( git tag --points-at HEAD )" - elif [ "$( git rev-parse --abbrev-ref HEAD )" != "HEAD" ]; then - GIT_TYPE=BRANCH - GIT_SLUG="$( git rev-parse --abbrev-ref HEAD )" - else - false - fi - echo ::set-env name=GIT_TYPE::${GIT_TYPE} - echo ::set-env name=GIT_SLUG::${GIT_SLUG} - - - name: Publish images (only repo owner) - run: | - retry() { - for n in $(seq ${RETRIES}); do - echo "[${n}/${RETRIES}] ${*}"; - if eval "${*}"; then - return 0; - fi; - sleep 10; - done; - return 1; - } - - # Info output - echo "Git Type: ${GIT_TYPE}" - echo "Git Slug: ${GIT_SLUG}" - # Login - echo "retry make login USER= PASS=" - # Push - if [ "${GIT_TYPE}" = "TAG" ]; then - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - else - if [ "${GIT_SLUG}" = "master" ]; then - echo "retry make push-base VERSION=${VERSION}" - echo "retry make push-mods VERSION=${VERSION}" - echo "retry make push-prod VERSION=${VERSION}" - echo "retry make push-work VERSION=${VERSION}" - else - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - fi - fi - env: - VERSION: ${{ matrix.version }} - RETRIES: 5 diff --git a/.travis.yml b/.travis.yml index 4be2175..5a4d6c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,10 +69,6 @@ install: ### Check generation changes, build and test ### before_script: - # Regenerate Dockerfiles and make sure nothing has changed (every stage) - - make gen-dockerfiles - - git diff --quiet || { echo "Build Changes"; git diff; git status; false; } - # Build (multiple tries due to network outages) - retry make build-base VERSION=${PHP} #- retry make test-base VERSION=${PHP} @@ -86,10 +82,6 @@ before_script: - retry make build-work VERSION=${PHP} - retry make test-work VERSION=${PHP} - # Test if PHP modules have changed - - make gen-readme VERSION=${PHP} - - git diff --quiet || { echo "Build Changes"; git diff; git status; false; } - ### ### Push to Dockerhub