Skip to content

Commit

Permalink
ci: Add conditions to release & fix README badges
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenn92 committed Jan 8, 2024
1 parent bfda468 commit 093585f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<a href="https://discord.gg/WP4ZW2QYwk"><img src="https://dcbadge.vercel.app/api/server/WP4ZW2QYwk?style=flat&theme=default-inverted" width="25%" alt="Discord link"/></a>
&nbsp;
<picture>
<img src="https://github.com/jorenn92/maintainerr/workflows/Build/badge.svg?branch=main" width="17%" alt="Build" /> </picture>
<img src="https://github.com/jorenn92/Maintainerr/actions/workflows/build.yml/badge.svg?branch=main" width="17%" alt="Build" /> </picture>
&nbsp;
<picture>
<img src="https://github.com/jorenn92/maintainerr/workflows/Release/badge.svg?branch=main" width="19%" alt="Release" /> </picture>
<img src="https://github.com/jorenn92/Maintainerr/actions/workflows/release.yml/badge.svg?branch=main" width="19%" alt="Release" /> </picture>
&nbsp;
<a href="https://hub.docker.com/r/jorenn92/maintainerr"><img src="https://img.shields.io/docker/pulls/jorenn92/maintainerr" alt="Docker pulls" width="16.5%"></a>
</p>
Expand Down

0 comments on commit 093585f

Please sign in to comment.