Skip to content

Bump actions/checkout from 3.3.0 to 4.1.7 #118

Bump actions/checkout from 3.3.0 to 4.1.7

Bump actions/checkout from 3.3.0 to 4.1.7 #118

Workflow file for this run

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/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Cache Docker layers
uses: actions/[email protected]
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/[email protected]
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 }}