remove old gitflow

This commit is contained in:
2025-09-09 14:58:45 -04:00
parent 58f83a8523
commit 10c1d3c4fe
5 changed files with 0 additions and 294 deletions
-35
View File
@@ -1,35 +0,0 @@
name: Generate Changelog on Tag
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build changelog from commits
id: build
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: .github/changelog-config.json
ignorePreReleases: false
toTag: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create / Update GitHub Release notes
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
body: ${{ steps.build.outputs.changelog }}
-59
View File
@@ -1,59 +0,0 @@
name: Build & Push DEV to GHCR
on:
pull_request:
branches: [ dev ]
push:
branches: [ dev ]
permissions:
contents: read
packages: write
jobs:
docker:
runs-on: ubuntu-latest
env:
# PRs: single-arch build (faster). Push to dev: multi-arch.
PLATFORMS: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compute DEV tags
run: |
SHA7="${GITHUB_SHA::7}"
echo "SHA7=$SHA7" >> $GITHUB_ENV
echo "DEV_TAGS=ghcr.io/${GITHUB_REPOSITORY}:dev,ghcr.io/${GITHUB_REPOSITORY}:dev-${SHA7}" >> $GITHUB_ENV
echo "Computed DEV_TAGS=${{ env.DEV_TAGS }}"
- name: Set up QEMU
if: ${{ env.PLATFORMS == 'linux/amd64,linux/arm64' }}
uses: docker/setup-qemu-action@v3
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & (maybe) push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.DEV_TAGS }}
build-args: |
VERSION=dev-${{ env.SHA7 }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
-113
View File
@@ -1,113 +0,0 @@
name: Build & Publish to GHCR (from VERSION + Release)
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
permissions:
contents: write # create tag + release
packages: write
pull-requests: read
jobs:
docker:
runs-on: ubuntu-latest
env:
PLATFORMS: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read VERSION
id: ver
run: |
if [[ ! -f VERSION ]]; then echo "VERSION missing"; exit 1; fi
RAW=$(tr -d ' \n' < VERSION)
if [[ -z "$RAW" ]]; then echo "VERSION empty"; exit 1; fi
if [[ "$RAW" =~ ^v ]]; then TAG="$RAW"; NUM="${RAW#v}"; else TAG="v${RAW}"; NUM="$RAW"; fi
echo "TAG=$TAG" >> $GITHUB_ENV
echo "NUM=$NUM" >> $GITHUB_ENV
echo "Resolved TAG=$TAG NUM=$NUM"
- name: Create tag (if missing)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: actions/github-script@v7
with:
script: |
const tag = process.env.TAG;
const sha = context.sha;
const { owner, repo } = context.repo;
try {
await github.rest.git.getRef({ owner, repo, ref: `tags/${tag}` });
core.info(`Tag ${tag} exists`);
} catch (e) {
if (e.status === 404) {
core.info(`Creating tag ${tag} -> ${sha}`);
await github.rest.git.createRef({ owner, repo, ref: `refs/tags/${tag}`, sha });
} else { throw e; }
}
- name: Update draft release notes
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
id: drafter
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish GitHub Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG }}
name: Remediarr ${{ env.TAG }}
draft: false
prerelease: false
body: ${{ steps.drafter.outputs.body }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
if: ${{ env.PLATFORMS == 'linux/amd64,linux/arm64' }}
uses: docker/setup-qemu-action@v3
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ env.TAG }},enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build & Push (main)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
-66
View File
@@ -1,66 +0,0 @@
name: Notify on new issues
on:
issues:
types: [opened]
workflow_dispatch: {}
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Validate required secrets
run: |
if [[ -z "${{ secrets.GOTIFY_URL }}" ]]; then
echo "Error: GOTIFY_URL secret is not set"
exit 1
fi
if [[ -z "${{ secrets.GOTIFY_TOKEN }}" ]]; then
echo "Error: GOTIFY_TOKEN secret is not set"
exit 1
fi
echo "Secrets validation passed"
- name: Build and send Gotify notification
env:
GOTIFY_URL: ${{ secrets.GOTIFY_URL }}
GOTIFY_TOKEN: ${{ secrets.GOTIFY_TOKEN }}
run: |
set -euo pipefail
# Remove trailing slash from URL if present
GOTIFY_URL="${GOTIFY_URL%/}"
# Validate URL format
if [[ ! "$GOTIFY_URL" =~ ^https?:// ]]; then
echo "Error: GOTIFY_URL must start with http:// or https://"
exit 1
fi
# Build the notification payload
TITLE="New issue in ${{ github.repository }}"
MESSAGE="Issue #${{ github.event.issue.number }}: ${{ github.event.issue.title }}
By: ${{ github.actor }}
${{ github.event.issue.html_url }}"
# Create JSON payload
PAYLOAD=$(jq -n \
--arg title "$TITLE" \
--arg message "$MESSAGE" \
--argjson priority 5 \
'{title: $title, message: $message, priority: $priority}')
echo "Sending notification to Gotify..."
echo "URL: ${GOTIFY_URL}/message"
echo "Payload: $PAYLOAD"
# Send the notification using header authentication
curl -X POST "${GOTIFY_URL}/message" \
-H "Content-Type: application/json" \
-H "X-Gotify-Key: ${GOTIFY_TOKEN}" \
-d "$PAYLOAD" \
--fail \
--show-error \
--silent
echo "Notification sent successfully!"
-21
View File
@@ -1,21 +0,0 @@
name: Release Drafter
on:
push:
branches: [ main ]
pull_request:
types: [opened, reopened, synchronize, closed]
branches: [ main ]
permissions:
contents: write
pull-requests: read
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}