From 3bea3f81a7b439ec044a886b547244e8203fe55c Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Thu, 10 Apr 2025 02:36:50 +0200 Subject: [PATCH] reuse docker workflow --- .github/workflows/build.yml | 23 +++++++---------- .github/workflows/docker.yml | 50 ++++++++---------------------------- CHANGELOG.md | 6 +++++ package.json | 2 +- 4 files changed, 26 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a7a8b6..5d4cd55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 67b35e6..93b6624 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 965f3a6..2b49111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index 0be819e..858701c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.1", + "version": "1.4.2", "license": "MIT", "type": "module", "main": "./src/index.ts",