docker-php-nginx/.github/workflows/build-php7-arm.yml

43 lines
1.1 KiB
YAML

name: Build PHP 7 ARM Image
on:
push:
branches:
- master
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: 🔍 Checkout code
uses: actions/checkout@v2
- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: 🔑 Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🎃 Set up outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: ⚓ Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.php7.arm
pull: true
push: true
# build-args: |
# arg1=value1
# arg2=value2
cache-from: type=registry,ref=mashirozx/php-nginx:php7-arm
cache-to: type=inline
tags: |
mashirozx/php-nginx:php7-arm
mashirozx/php-nginx:php7arm-${{steps.vars.outputs.sha_short}}