From 093585f1edac01de59ad5907fd73e55b77a14e24 Mon Sep 17 00:00:00 2001 From: jorenn92 Date: Mon, 8 Jan 2024 12:02:39 +0100 Subject: [PATCH] ci: Add conditions to release & fix README badges --- .github/workflows/release.yml | 19 +++++++++++++++---- Dockerfile | 2 +- README.md | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 767885b7..8fc7ce0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,19 @@ name: "Release" on: workflow_dispatch: + inputs: + dry-run-semantic-release: + type: boolean + description: Dry-run semantic-release + default: false + with-docker-images: + type: boolean + description: Build and push docker images + default: true jobs: semantic-release: + if: github.triggering_actor == github.repository_owner name: Tag and release latest version runs-on: ubuntu-22.04 steps: @@ -21,10 +31,11 @@ jobs: - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release --dry-run + run: ${{ github.event.inputs.dry-run-semantic-release == true && 'npx semantic-release --dry-run' || 'npx semantic-release' }} build-docker-image: - name: Build docker images + if: github.triggering_actor == github.repository_owner && github.event.inputs.with-docker-images == true + name: Build and push docker images needs: semantic-release runs-on: ubuntu-latest steps: @@ -70,6 +81,6 @@ jobs: tags: | ghcr.io/jorenn92/maintainerr:${{ steps.package-version.outputs.current-version}} ghcr.io/jorenn92/maintainerr:latest - # jorenn92/maintainerr:latest - # jorenn92/maintainerr:${{ steps.package-version.outputs.current-version}} + jorenn92/maintainerr:${{ steps.package-version.outputs.current-version}} + jorenn92/maintainerr:latest labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index f917d343..b12a46e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ COPY --from=BUILDER /opt ./ COPY supervisord.conf /etc/supervisord.conf RUN apk add supervisor && \ - rm -rf /tmp/* && \ + rm -rf /tmp/* && \ mkdir /opt/data && \ chown -R node:node /opt diff --git a/README.md b/README.md index adfee58a..07700194 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ Discord link   - Build + Build   - Release + Release   Docker pulls