ci: update workflows

This commit is contained in:
2025-06-13 15:56:55 -07:00
parent 9cda4061d5
commit c35a726e93

View File

@@ -67,37 +67,25 @@ on:
type: string type: string
# # # #
# Main Branch # Branch
# #
# main branch re-recreate # select branch to clean
# you must also run the workflow from that branch
# # # #
BRANCH_MAIN: BRANCH:
description: '🌳 Main Branch' description: '🌳 Branch'
required: true required: true
default: 'main' default: 'main'
type: string type: string
# #
# Deployment Environment Name
#
# this is the name of the deployment item
# #
DEPLOYMENT_ENV:
description: '📦 Deployment Environment'
required: true
default: 'orion'
type: string
# # # #
# environment variables # environment variables
# # # #
env: env:
COMMIT_LABEL: ${{ github.event.inputs.COMMIT_LABEL || 'cleanup' }} COMMIT_LABEL: ${{ github.event.inputs.COMMIT_LABEL || 'cleanup' }}
BRANCH_MAIN: ${{ github.event.inputs.BRANCH_MAIN || 'main' }} BRANCH: ${{ github.event.inputs.BRANCH || 'main' }}
DEPLOYMENT_ENV: ${{ github.event.inputs.DEPLOYMENT_ENV || 'orion' }}
BOT_NAME_1: EuropaServ BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ BOT_NAME_2: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot] BOT_NAME_DEPENDABOT: dependabot[bot]
@@ -111,9 +99,11 @@ jobs:
history-clean: history-clean:
name: >- name: >-
🧹 History Clean 🧹 History Clean
# runs-on: ubuntu-latest runs-on: ubuntu-latest
runs-on: apollo-x64 # runs-on: apollo-x64
timeout-minutes: 5 timeout-minutes: 15
permissions:
contents: write
steps: steps:
# # # #
@@ -254,7 +244,7 @@ jobs:
now=$(date -u '+%m/%d/%Y %H:%M') now=$(date -u '+%m/%d/%Y %H:%M')
commit_label="${{ env.COMMIT_LABEL }}" >> $GITHUB_ENV commit_label="${{ env.COMMIT_LABEL }}" >> $GITHUB_ENV
echo -e "$commit_label" echo -e "$commit_label"
commit_message="\\\`️️🧹 $commit_label 🧹\\\` \\\`$now UTC\\\`" >> $GITHUB_ENV commit_message="chore(maint): \\\`️️🧹 $commit_label 🧹\\\` \\\`$now UTC\\\`" >> $GITHUB_ENV
echo -e "$commit_message" echo -e "$commit_message"
echo "COMMIT_MESSAGE=$(echo $commit_message)" >> $GITHUB_ENV echo "COMMIT_MESSAGE=$(echo $commit_message)" >> $GITHUB_ENV
echo "NOW=$(echo $now)" >> $GITHUB_ENV echo "NOW=$(echo $now)" >> $GITHUB_ENV
@@ -290,24 +280,25 @@ jobs:
git commit -m "${{ env.COMMIT_MESSAGE }}" git commit -m "${{ env.COMMIT_MESSAGE }}"
# Delete the old main branch # Delete the old main branch
git branch -D ${{ env.BRANCH_MAIN }} git branch -D ${{ env.BRANCH }}
# Rename the new orphan branch to main # Rename the new orphan branch to main
git branch -m ${{ env.BRANCH_MAIN }} git branch -m ${{ env.BRANCH }}
# Force push the new main branch to the remote repository # Force push the new main branch to the remote repository
git push -f origin ${{ env.BRANCH_MAIN }} git push -f origin ${{ env.BRANCH }}
# # # #
# History Clean References # History Clean References
# # # #
- name: >- - name: >-
🗑️ Clean References 🗑️ Garbage Collection (Aggressive)
run: | run: |
# Remove remote-tracking references to deleted branches (optional) # Remove remote-tracking references to deleted branches (optional)
git fetch origin --prune git fetch origin --prune
git repack
git prune-packed
git reflog expire --expire=now --all git reflog expire --expire=now --all
git gc --prune=now --aggressive git gc --prune=now --aggressive