Skip to content

Commit

Permalink
feat: restrict who can trigger mirror and release builds (#139)
Browse files Browse the repository at this point in the history
* feat: restrict mirror and release actions to valid users
* refactor: remove superfluous defaults
  • Loading branch information
Vinai authored Oct 5, 2023
1 parent a293d6e commit 07f1acb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-mageos-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & check Mage-OS Nightly
name: Build, deploy & check Mage-OS Nightly

on:
schedule:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-mageos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@ on:
default: false
type: boolean

push:
branches:
- main

jobs:
deploy:
uses: ./.github/workflows/deploy.yml
name: "generate & deploy"
if: contains('["vinai","mage-os-ci"]', github.actor)
with:
repo: ${{ inputs.repo }}
remote_dir: ${{ inputs.remote_dir }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ jobs:
deploy:
uses: ./.github/workflows/deploy.yml
name: "generate & deploy"
if: contains('["vinai","mage-os-ci"]', github.actor)
with:
repo: ${{ inputs.repo || 'https://preview-mirror.mage-os.org' }}
remote_dir: ${{ inputs.remote_dir || '/var/www/preview-mirror.mage-os.org/html/' }}
repo: ${{ inputs.repo }}
remote_dir: ${{ inputs.remote_dir }}
entrypoint: src/make/mirror.js
delete: true
secrets:
Expand All @@ -39,6 +40,6 @@ jobs:
needs: [deploy]
uses: ./.github/workflows/integrity-check.yml
with:
repo: ${{ inputs.repo || 'https://preview-mirror.mage-os.org/' }}
repo: ${{ inputs.repo }}
secrets:
composer_auth: ${{ secrets.composer_auth }}
2 changes: 1 addition & 1 deletion .github/workflows/build-upstream-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & check Upstream Nightly
name: Build, deploy & check Upstream Nightly

on:
schedule:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & deploy given Mage-OS composer repo
name: "[workflow call] Build & deploy given Mage-OS composer repo"

on:
workflow_call:
Expand Down Expand Up @@ -121,4 +121,3 @@ jobs:
with:
name: release-build-working-copies-${{ env.mageos_release }}
path: release-build-working-copies-${{ env.mageos_release }}.tar

2 changes: 1 addition & 1 deletion .github/workflows/integrity-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check integrity of given Mirror repo
name: "[workflow call] Check integrity of given mirror repo"

on:
workflow_call:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-release-tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Publish Mage-OS release tag to GIT repositories"
name: "[workflow call] Publish Mage-OS release tag to git repositories"

on:
workflow_call:
Expand Down

0 comments on commit 07f1acb

Please sign in to comment.