Skip to content

Commit 0c9422c

Browse files
authored
Merge pull request #185 from fballiano/inputs-for-automatic-workflows
Improved build-upstream-mirror workflow with variables and default values
2 parents 6f8b7d8 + 9d268a7 commit 0c9422c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/build-upstream-mirror.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,26 @@ on:
2121
- /var/www/mirror.mage-os.org/html/
2222
push:
2323
branches:
24-
- main
24+
- main
2525

2626
jobs:
2727
deploy:
2828
uses: ./.github/workflows/deploy.yml
2929
name: "generate & deploy"
3030
if: contains('["vinai", "rhoerr", "fballiano", "mage-os-ci"]', github.actor)
3131
with:
32-
repo: ${{ inputs.repo }}
33-
remote_dir: ${{ inputs.remote_dir }}
32+
repo: ${{ (github.event_name == 'workflow_dispatch' && inputs.repo) || 'https://preview-mirror.mage-os.org/' }}
33+
remote_dir: ${{ (github.event_name == 'workflow_dispatch' && inputs.remote_dir) || '/var/www/preview-mirror.mage-os.org/html/' }}
3434
entrypoint: src/make/mirror.js
3535
delete: true
3636
secrets:
3737
SERVER_SSH_KEY: ${{ secrets.SERVER_SSH_KEY }}
3838
REMOTE_USER: ${{ secrets.REMOTE_USER }}
39+
3940
integrity-check:
4041
needs: [deploy]
4142
uses: ./.github/workflows/integrity-check.yml
4243
with:
43-
repo: ${{ inputs.repo }}
44+
repo: ${{ (github.event_name == 'workflow_dispatch' && inputs.repo) || 'https://preview-mirror.mage-os.org/' }}
4445
secrets:
4546
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

0 commit comments

Comments
 (0)