build(deps): bump docker/build-push-action from 6.12.0 to 6.13.0 #448
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Docker image | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18, 20, 22] | |
variant: [default, slim, alpine] | |
steps: | |
- uses: actions/[email protected] | |
- name: Build and test Docker image | |
run: | | |
# Determine the Docker build path | |
if [ "${{ matrix.variant }}" = "default" ]; then | |
VARIANT_PATH="" | |
CHROMIUM_CMD="chromium" | |
else | |
VARIANT_PATH="/${{ matrix.variant }}" | |
if [ "${{ matrix.variant }}" = "alpine" ]; then | |
CHROMIUM_CMD="chromium-browser" | |
else | |
CHROMIUM_CMD="chromium" | |
fi | |
fi | |
IMAGE_PATH="${{ matrix.node-version }}${VARIANT_PATH}" | |
echo "Testing Node.js ${{ matrix.node-version }} (${{ matrix.variant }})" | |
# Run the container and execute the commands | |
OUTPUT=$(docker run -i $(docker build -q ${IMAGE_PATH}) /bin/sh -c " | |
node --version && | |
npm --version && | |
${CHROMIUM_CMD} --version && | |
${CHROMIUM_CMD} --headless --no-sandbox --disable-gpu --screenshot https://www.whatsmybrowser.org/ | |
") | |
echo "$OUTPUT" | |
# Validate Node.js version | |
if ! echo "$OUTPUT" | grep -q "v${{ matrix.node-version }}"; then | |
echo "::error::Expected Node.js v${{ matrix.node-version }} but got different version" | |
exit 1 | |
fi | |
auto-merge: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: Automatically merge dependabot upgrades | |
uses: fastify/[email protected] | |
with: | |
target: minor |