feat: release for 8.3.25 #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker | |
| on: | |
| push: | |
| branches: | |
| - 8.3.x | |
| jobs: | |
| push: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image-variant: [ 'franken', 'apache', 'cli', 'fpm', 'supervisor', 'dev', 'oci', 'supervisor-oci' ] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Log into registry | |
| run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ secrets.DOCKER_REGISTRY_URL }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
| - name: Build and push the images | |
| run: | | |
| VERSION=${{ matrix.image-variant }} | |
| PHP_SHORT_VERSION=8.3 | |
| PHP_VERSION=8.3.25 | |
| tmpName="image-$RANDOM" | |
| docker build $VERSION --file $VERSION/Dockerfile --tag $tmpName --build-arg PHP_VERSION=$PHP_VERSION | |
| if [ $? -ne 0 ]; then | |
| echo "Docker build failed, for ${VERSION}-$PHP_VERSION" | |
| exit 1 | |
| fi | |
| IMAGE_ID=${{ secrets.DOCKER_REGISTRY_URL }}/${{ secrets.DOCKER_USERNAME }}/${{ secrets.IMAGE_NAME }} | |
| docker tag $tmpName $IMAGE_ID:$VERSION | |
| docker push $IMAGE_ID:$VERSION | |
| docker tag $tmpName $IMAGE_ID:${VERSION}-$PHP_VERSION | |
| docker push $IMAGE_ID:${VERSION}-$PHP_VERSION | |
| docker tag $tmpName $IMAGE_ID:${VERSION}-$PHP_SHORT_VERSION | |
| docker push $IMAGE_ID:${VERSION}-$PHP_SHORT_VERSION |