Skip to content

ci: docker platforms arm #17

ci: docker platforms arm

ci: docker platforms arm #17

Workflow file for this run

name: Laravel 11
on:
push:
tags:
- v*
paths-ignore:
- "**.md"
branches:
- main
pull_request:
branches:
- main
jobs:
test:
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
name: Test
runs-on: ubuntu-latest
container:
image: laravelfans/laravel:11-dev
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Prepare
run: |
composer install
npm install
npm run build
-
name: PHPUnit
env:
XDEBUG_MODE: coverage
run: php artisan test
-
name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
-
name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
-
name: Lint PHP
run: php artisan lint:code
-
uses: hadolint/hadolint-action@v3.1.0
buildx:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Get Version from Tag
id: tagver
uses: ChrSchu90/GitTagSemanticVersion@v1.1
-
name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
push: true
tags: wifidog/wifidog-auth-laravel:latest,wifidog/wifidog-auth-laravel:${{ steps.tagver.outputs.version }}