From 831a133b638717ad01b00e079be7e2d10c27b14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Thu, 14 Nov 2024 21:07:20 +0300 Subject: [PATCH] Update github action file --- .github/workflows/production_pull_code.yml | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/production_pull_code.yml diff --git a/.github/workflows/production_pull_code.yml b/.github/workflows/production_pull_code.yml new file mode 100644 index 000000000..bae407651 --- /dev/null +++ b/.github/workflows/production_pull_code.yml @@ -0,0 +1,76 @@ +name: Production Projects - Pull Code + +on: + workflow_dispatch: + inputs: + environment: + description: 'Select Project Prod Server' + required: true + type: choice + options: + - Cyber-Security-Project + - Ensan-Project + - Helpdesk-Khabir-Project + - King-AbdelAziz-Library-Project + - Twahod-Project + default: Helpdesk-Khabir-Project + +jobs: +# Cyber Project + cyber_master_server: + name: Deploy to Cyber Master + runs-on: cyber-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Cyber-Security-Project' + steps: + - name: Checkout And Restart Project + run: | + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + +# Ensan Project + ensan_master_server: + name: Deploy to Ensan Master + runs-on: ensan-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Ensan-Project' + steps: + - name: Checkout And Restart Project + run: | + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + +# Helpdesk Project + helpdesk_maser_server: + name: Deploy to Helpdesk Master + runs-on: helpdesk_server + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Helpdesk-Khabir-Project' + steps: + - name: Checkout And Restart Project + run: | + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + +# King Abdel Aziz Lobrary project + kaz_master_server: + name: Deploy to Master + runs-on: kaz-library-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'King-AbdelAziz-Library-Project' + steps: + - name: Checkout And Restart Project + run: | + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + +# Twahod project + twahod_master_server: + name: Deploy to Master + runs-on: twahod-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Twahod-Project' + steps: + - name: Checkout And Restart Project + run: | + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_standard_code.sh + +# if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') + +