diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae3e4db..a5ece84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -306,6 +306,12 @@ jobs: needs: [build-release-artifacts] runs-on: ubuntu-latest 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 uses: actions/checkout@v3 with: @@ -383,6 +389,12 @@ jobs: name: Publish Chocolatey Package runs-on: windows-latest 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 uses: actions/checkout@v4 with: @@ -431,6 +443,12 @@ jobs: name: Update Homebrew formulas runs-on: ubuntu-latest 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 uses: actions/checkout@v4 with: @@ -489,6 +507,12 @@ jobs: name: Publishing Docker image to Docker Hub runs-on: ubuntu-latest 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 uses: actions/checkout@v4 with: @@ -522,19 +546,19 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub + if: env.ACT != 'true' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Push to Docker Hub - if: env.ACT != 'true' uses: docker/build-push-action@v5 with: context: . file: Dockerfile platforms: linux/amd64,linux/arm64 - push: true + push: ${{ env.ACT != 'true' }} tags: darkalex17/managarr:latest, darkalex17/managarr:${{ env.version }} publish-crate: @@ -543,7 +567,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if actor is repository owner - if: ${{ github.actor != github.repository_owner }} + if: ${{ github.actor != github.repository_owner && env.ACT != 'true' }} run: | echo "You are not authorized to run this workflow." exit 1 @@ -553,6 +577,13 @@ jobs: with: 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 if: env.ACT != 'true' run: |