Skip to content

package(deps): update container dependencies #395

package(deps): update container dependencies

package(deps): update container dependencies #395

name: "🏗️ Container Image Build"
on:
pull_request:
branches:
- main
paths:
- container/**
push:
branches:
- main
paths:
- container/**
workflow_dispatch:
inputs:
publish:
type: boolean
default: false
required: true
description: "Push the image after the build?"
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Install qemu dependency
run: |-
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Get Uptime-Kuma Version
run: |-
VERSION=`sed -nr "s;.*docker.io/louislam/uptime-kuma:(.*)-debian.*;\1;p" container/Containerfile`
echo "APP_VERSION=${VERSION}"
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
- id: container
name: Build Container Image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: uptime-kuma
tags: >-
latest
${{ env.APP_VERSION }}
oci: true
platforms: linux/amd64, linux/arm64, linux/arm/v7
containerfiles: |-
container/Containerfile
- name: Push container image to quay.io
if: ${{ (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish)) && github.ref == 'refs/heads/main' }}
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
with:
image: ${{ steps.container.outputs.image }}
tags: ${{ steps.container.outputs.tags }}
registry: quay.io/k3rnel-pan1c
username: ${{ secrets.QUAY_USR }}
password: ${{ secrets.QUAY_PWD }}
- name: Push container image to ghcr.io
if: ${{ (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish)) && github.ref == 'refs/heads/main' }}
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
with:
image: ${{ steps.container.outputs.image }}
tags: ${{ steps.container.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ github.token }}