reuse docker workflow

This commit is contained in:
2025-04-10 02:36:50 +02:00
parent e0af9cd82e
commit 3bea3f81a7
4 changed files with 26 additions and 55 deletions

View File

@@ -3,6 +3,8 @@ name: Build Docker image
on:
pull_request:
push:
branches:
- main
concurrency:
group: build
@@ -10,17 +12,10 @@ concurrency:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: false
name: Build Docker Image
uses: cupcakearmy/workflows/.github/workflows/docker.yml@main
with:
name: cupcakearmy/ddns-cloudflare
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

View File

@@ -2,46 +2,16 @@ name: Publish Docker image
on:
release:
types: [published]
types:
- published
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Docker Labels
id: meta
uses: docker/metadata-action@v4
with:
images: |
cupcakearmy/ddns-cloudflare
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
name: Build Docker Image
uses: cupcakearmy/workflows/.github/workflows/docker.yml@main
with:
name: cupcakearmy/ddns-cloudflare
push: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

View File

@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.1] - 2025-04-10
### Changed
- Build system
## [1.4.1] - 2024-02-27
### Changed

View File

@@ -1,5 +1,5 @@
{
"version": "1.4.1",
"version": "1.4.2",
"license": "MIT",
"type": "module",
"main": "./src/index.ts",