Skip to content

renovate: automerge updates to Dockerfile #43

renovate: automerge updates to Dockerfile

renovate: automerge updates to Dockerfile #43

name: Build
on:
pull_request: {}
push:
branches:
- main
jobs:
build-contianer:
permissions:
contents: read
packages: write
name: Build container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Gather versions
id: repo
run: |-
alpine_version_full="$(grep -e "ALPINE_VERSION=" Dockerfile | cut -d '=' -f 2)"
alpine_version="${alpine_version_full%@*}"
chromium_version="$(grep -e "CHROMIUM_VERSION=" Dockerfile | cut -d '=' -f 2)"
echo "alpine_version_full=$alpine_version_full" >> "$GITHUB_OUTPUT"
echo "alpine_version=$alpine_version" >> "$GITHUB_OUTPUT"
echo "chromium_version=$chromium_version" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Log into ghcr.io
if: github.event_name == 'push'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
with:
push: ${{ github.event_name == 'push' }}
platforms: linux/amd64,linux/arm64
tags: |-
ghcr.io/${{ github.repository }}:${{ steps.repo.outputs.chromium_version }}-${{ steps.repo.outputs.alpine_version }}