Skip to content

.github/workflows/playwright.yml #21

.github/workflows/playwright.yml

.github/workflows/playwright.yml #21

Workflow file for this run

on:
push:
branches: [ "*" ]
tags: [ "*" ]
schedule:
- cron: "0 10 * * 1"
env:
REGISTRY: "ghcr.io"
IMAGE_NAME: "${{ github.repository }}"
jobs:
build-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
jdk_version: [ 21 ]
env:
PLAYWRIGHT_VERSION: "1.38"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,event=push,enable=true,prefix=branch-{{ branch }}-${{ matrix.jdk_version }}-playwright${{ env.PLAYWRIGHT_VERSION }}-git-,format=short
type=raw,event=push,enable={{ is_default_branch }},value={{ branch }}-${{ matrix.jdk_version }}-playwright${{ env.PLAYWRIGHT_VERSION }}
type=raw,event=push,enable={{ is_default_branch }},value=${{ matrix.jdk_version }}-playwright${{ env.PLAYWRIGHT_VERSION }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: playwright
build-args: |
JDK_VERSION=${{ matrix.jdk_version }}
PLAYWRIGHT_VERSION=${{ env.PLAYWRIGHT_VERSION }}