Skip to content

Update php Docker tag to v8.4 #98

Update php Docker tag to v8.4

Update php Docker tag to v8.4 #98

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
- 'feature/**'
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
container:
# https://hub.docker.com/r/drevops/ci-runner
image: drevops/ci-runner:25.8.0@sha256:d6ba40fc4248ce291302a2cf212de9b80da5433f2fdf29be09ed59659df9e18d
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV" # https://github.com/actions/runner/issues/863
- name: Check out the repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
continue-on-error: ${{ vars.CI_LINT_IGNORE_FAILURE == '1' }}
- name: Run unit tests with code coverage
run: npm run test-coverage
shell: bash
continue-on-error: ${{ vars.CI_TEST_IGNORE_FAILURE == '1' }}
- name: Run functional tests
run: npm run test-functional
shell: bash
continue-on-error: ${{ vars.CI_TEST_IGNORE_FAILURE == '1' }}
- name: Upload coverage report as an artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{github.job}}-code-coverage-report
include-hidden-files: true
path: .coverage-html
if-no-files-found: error
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
if: ${{ env.CODECOV_TOKEN != '' }}
with:
directory: .coverage-html
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build Docker image
run: docker build .
push-canary-to-registry:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
- name: Log in to Docker Hub
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5
with:
images: drevops/docker-wait-for-dependencies
- name: Build and push Docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
context: .
push: true
tags: drevops/docker-wait-for-dependencies:canary
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64