Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy by label for naos #4384

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/deploy-mestra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
deploy:
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'deploy' }}
if: ${{ github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'deploy mestra') }}
environment:
name: mestra
url: https://mestra.ugent.be
Expand All @@ -26,9 +26,10 @@ jobs:
- name: Run deploy
run: |
echo "deploy mestra $GITHUB_SHA" | ssh -p 4840 dodona@mestra.ugent.be
- name: Remove deploy label
- name: Remove deploy label
if: github.event.action == 'labeled'
uses: buildsville/add-remove-label@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
label: deploy
label: deploy mestra
type: remove
13 changes: 12 additions & 1 deletion .github/workflows/deploy-naos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: Deploy Naos

on:
workflow_dispatch:
pull_request:
types:
- labeled

concurrency:
group: deploy-naos
cancel-in-progress: true

jobs:
deploy:
if: ${{ github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'deploy naos') }}
environment:
name: naos
url: https://naos.ugent.be
Expand All @@ -21,4 +25,11 @@ jobs:
known_hosts: ${{ secrets.MESTRA_HOST }}
- name: Run deploy
run: |
echo "deploy naos $GITHUB_REF" | ssh -p 4840 dodona@mestra.ugent.be
echo "deploy naos $GITHUB_SHA" | ssh -p 4840 dodona@mestra.ugent.be
- name: Remove deploy label
if: github.event.action == 'labeled'
uses: buildsville/add-remove-label@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
label: deploy naos
type: remove