Bump docker/login-action from 4.4.0 to 4.5.2 #141
Workflow file for this run
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: CI/CD | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| version: [php, proxy, static] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4.2.0 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v6.1.0 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: docker-buildx-${{ matrix.version }}-${{ github.sha }} | |
| restore-keys: docker-buildx-${{ matrix.version }}- | |
| - name: Build | |
| run: | | |
| docker buildx build \ | |
| --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }} \ | |
| --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }} \ | |
| --output type=docker \ | |
| --tag kooldev/nginx:${{ matrix.version }} \ | |
| ${{ matrix.version }} | |
| - name: Tests | |
| run: docker run kooldev/nginx:${{ matrix.version }} nginx -v | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4.5.2 | |
| if: github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-nginx' | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Push to DockerHub | |
| if: github.ref == 'refs/heads/master' && github.repository == 'kool-dev/docker-nginx' | |
| run: docker push kooldev/nginx:${{ matrix.version }} |