ci: Improved the release workflow to be more compatible with Act local testing

This commit is contained in:
2025-08-29 15:41:39 -06:00
parent 8555052cc4
commit 2e3e511e3b
+34 -3
View File
@@ -306,6 +306,12 @@ jobs:
needs: [build-release-artifacts] needs: [build-release-artifacts]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
run: |
echo "You are not authorized to run this workflow."
exit 1
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
@@ -383,6 +389,12 @@ jobs:
name: Publish Chocolatey Package name: Publish Chocolatey Package
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
run: |
echo "You are not authorized to run this workflow."
exit 1
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -431,6 +443,12 @@ jobs:
name: Update Homebrew formulas name: Update Homebrew formulas
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
run: |
echo "You are not authorized to run this workflow."
exit 1
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -489,6 +507,12 @@ jobs:
name: Publishing Docker image to Docker Hub name: Publishing Docker image to Docker Hub
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
run: |
echo "You are not authorized to run this workflow."
exit 1
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -522,19 +546,19 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to Docker Hub
if: env.ACT != 'true'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub - name: Push to Docker Hub
if: env.ACT != 'true'
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: Dockerfile file: Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: ${{ env.ACT != 'true' }}
tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }} tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }}
publish-crate: publish-crate:
@@ -543,7 +567,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if actor is repository owner - name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner }} if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }}
run: | run: |
echo "You are not authorized to run this workflow." echo "You are not authorized to run this workflow."
exit 1 exit 1
@@ -553,6 +577,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get bumped Cargo files (Act)
if: env.ACT == 'true'
uses: actions/download-artifact@v4
with:
name: bumped-cargo-files
path: ${{ github.workspace }}
- name: Ensure repository is up-to-date - name: Ensure repository is up-to-date
if: env.ACT != 'true' if: env.ACT != 'true'
run: | run: |