diff --git a/.github/workflows/continious-integration.yml b/.github/workflows/continious-integration.yml deleted file mode 100644 index 4856ccd..0000000 --- a/.github/workflows/continious-integration.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: continious integration - -on: - workflow_dispatch: - push: - branches: - - master - paths: - - 'v*/**' - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Check out repository - uses: actions/checkout@v2 - - - name: Login to docker hub - uses: actions-hub/docker/login@master - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build the Docker images 7.2 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:7.2 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:7.2 ./v7.2 - docker run --rm localhost/php-for-dev:7.2 php -v - docker tag localhost/php-for-dev:7.2 dannecron/php-for-dev:7.2 - echo "Done" - - - name: Build the Docker images 7.3 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:7.3 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:7.3 ./v7.3 - docker run --rm localhost/php-for-dev:7.3 php -v - docker tag localhost/php-for-dev:7.3 dannecron/php-for-dev:7.3 - echo "Done" - - - name: Build the Docker images 7.4 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:7.4 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:7.4 ./v7.4 - docker run --rm localhost/php-for-dev:7.4 php -v - docker tag localhost/php-for-dev:7.4 dannecron/php-for-dev:7.4 - docker tag localhost/php-for-dev:7.4 dannecron/php-for-dev:latest - echo "Done" - - - name: Build the Docker images 8.0 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:8.0 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:8.0 ./v8.0 - docker run --rm localhost/php-for-dev:8.0 php -v - docker tag localhost/php-for-dev:8.0 dannecron/php-for-dev:8.0 - echo "Done" - - name: Build the Docker images 8.1 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:8.1 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:8.1 ./v8.1 - docker run --rm localhost/php-for-dev:8.1 php -v - docker tag localhost/php-for-dev:8.1 dannecron/php-for-dev:8.1 - echo "Done" - - name: Build the Docker images 8.2 - run: | - DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:8.2 --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:8.2 ./v8.2 - docker run --rm localhost/php-for-dev:8.2 php -v - docker tag localhost/php-for-dev:8.2 dannecron/php-for-dev:8.2 - echo "Done" - - - name: push 7.2 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:7.2 - - - name: push 7.3 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:7.3 - - - name: push 7.4 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:7.4 - - - name: push 8.0 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:8.0 - - - name: push 8.1 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:8.1 - - - name: push 8.2 image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:8.2 - - - name: push latest image to docker hub - if: success() - uses: actions-hub/docker@master - with: - args: push dannecron/php-for-dev:latest diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..0012576 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,54 @@ +name: continious integration + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - 'v*/**' + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + php_version: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + steps: + - name: Check out repository + uses: actions/checkout@v2 + + - name: Login to docker hub + uses: actions-hub/docker/login@master + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build the Docker images ${{ matrix.version }} + run: | + DOCKER_BUILDKIT=1 docker build --cache-from=dannecron/php-for-dev:${{ matrix.version }} --build-arg BUILDKIT_INLINE_CACHE=1 --tag=localhost/php-for-dev:${{ matrix.version }} ./v${{ matrix.version }} + docker run --rm localhost/php-for-dev:${{ matrix.version }} php -v + docker tag localhost/php-for-dev:${{ matrix.version }} dannecron/php-for-dev:${{ matrix.version }} + echo "Done" + + - name: push ${{ matrix.version }} image to docker hub + if: success() + uses: actions-hub/docker@master + with: + args: push dannecron/php-for-dev:${{ matrix.version }} + + - name: tag latest image + if: | + success() + && ${{ matrix.version }} == 7.4 + uses: actions-hub/docker@master + with: + args: tag dannecron/php-for-dev:7.4 dannecron/php-for-dev:latest + + - name: push latest image to docker hub + if: | + success() + && ${{ matrix.version }} == 7.4 + uses: actions-hub/docker@master + with: + args: push dannecron/php-for-dev:latest