mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
name: Push container
|
|
jobs:
|
|
buildx:
|
|
name: Push branches and PRs
|
|
runs-on: ubuntu-latest
|
|
if: ${{ !github.event.repository.fork && !github.event.pull_request.head.repo.fork && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'amir20/dozzle') }}
|
|
steps:
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: amir20/dozzle
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3.2.0
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Writing certs to file
|
|
run: |
|
|
echo "${{ secrets.TTL_KEY }}" > shared_key.pem
|
|
echo "${{ secrets.TTL_CERT }}" > shared_cert.pem
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6.3.0
|
|
with:
|
|
context: .
|
|
push: true
|
|
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
build-args: TAG=${{ steps.meta.outputs.version }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|