Skip to content

PHP 7.4 nginx

PHP 7.4 nginx #48

Workflow file for this run

name: "PHP 7.4 nginx"
on:
workflow_dispatch:
schedule:
- cron: '35 19 * * 2'
push:
branches: [ "main" ]
paths:
- "php7.4-nginx/**"
pull_request:
branches: [ "main" ]
paths:
- "php7.4-nginx/**"
env:
# The default repo env will be 'ComputeStacks'; uppercase is not allowed.
GH_REPO: computestacks/cs-docker-wordpress
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log into Github Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v3
with:
context: php7.4-nginx/
push: ${{ github.event_name != 'pull_request' }}
tags: |
cmptstks/wordpress:php7.4-nginx
ghcr.io/${{ env.GH_REPO }}:php7.4-nginx
cache-from: type=gha
cache-to: type=gha,mode=max