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') + +