Skip to content

Commit

Permalink
Merge pull request #2047 from GSA/dev
Browse files Browse the repository at this point in the history
#2046 Add "|| true" to remove command for usagov_login
  • Loading branch information
XavierMetichecchia authored Jan 10, 2025
2 parents d669e83 + bf8ebdd commit b173def
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 77 deletions.
107 changes: 34 additions & 73 deletions .github/workflows/increment_sub_hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,14 @@ on:
workflow_dispatch: # Allows manual trigger

jobs:
# update-submodule-on-release:
# name: update-submodule-on-release
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout repository without submodules
# uses: actions/checkout@v4
# with:
# submodules: false # Do not checkout submodules initially
# fetch-depth: 0 # Fetch all history
#
# - name: Set up Git
# run: |
# git config --global user.name "Xavier Metichecchia"
# git config --global user.email "[email protected]"
# git config --global pull.rebase false # Ensure merge strategy
# git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
#
# - name: Update submodules on release branch
# continue-on-error: true
# run: |
# # Checkout the release branch
# git checkout release
#
# # Update and initialize submodules
# git submodule update --init
# git submodule set-branch --branch prod usagov-2021
# git submodule update --remote || echo "Expected error: Failed to update all submodules."
#
# # Check Git Status
# git add .
# git commit --allow-empty -m "Updated submodule to the latest commit on release branch"
#
# # Commit the changes
# git status
# git --no-pager diff
#
# # Push changes to release branch
# git push origin release

update-submodule-on-main:
name: update-submodule-on-main
update-submodule:
runs-on: ubuntu-latest

steps:
- name: Checkout repository without submodules
uses: actions/checkout@v4
with:
# submodules: false # Do not checkout submodules initially
submodules: false # Do not checkout submodules initially
fetch-depth: 0 # Fetch all history

- name: Set up Git
Expand All @@ -62,44 +21,46 @@ jobs:
git config --global pull.rebase false # Ensure merge strategy
git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
- name: Update submodules on release branch
continue-on-error: true
run: |
# Checkout the release branch
git checkout release
# Update and initialize submodules
git submodule update --init
git submodule set-branch --branch prod usagov-2021
git submodule update --remote || echo "Expected error: Failed to update all submodules."
# Check Git Status
git add .
git commit --allow-empty -m "Updated submodule to the latest commit on release branch"
# Commit the changes
git status
git --no-pager diff
# Push changes to release branch
git push origin release
- name: Sync release to main
run: |
# Switch to the main branch
git checkout main
git submodule update --remote
# Pull changes from release into main
git pull origin release
# Push updated main branch
git push origin main
# update-submodule-on-dev:
# name: update-submodule-on-dev
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout repository without submodules
# uses: actions/checkout@v4
# with:
# # submodules: false # Do not checkout submodules initially
# fetch-depth: 0 # Fetch all history
#
# - name: Set up Git
# run: |
# git config --global user.name "Xavier Metichecchia"
# git config --global user.email "[email protected]"
# git config --global pull.rebase false # Ensure merge strategy
# git remote set-url origin https://${{ secrets.HASH_PAT }}@github.com/GSA/px-benefit-finder.git
#
# - name: Sync release to dev
# run: |
# # Switch to the dev branch
# git checkout dev
#
# # Pull changes from release into dev
# git pull origin release
#
# # Push updated dev branch
# git push origin dev
- name: Sync release to dev
run: |
# Switch to the dev branch
git checkout dev
# Pull changes from release into dev
git pull origin release
# Push updated dev branch
git push origin dev
6 changes: 2 additions & 4 deletions scripts/drush-post-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ drush cim --partial --source=modules/custom/usagov_benefit_finder/configuration
drush cr
### USER_PASSWORD_RESET_PLACEHOLDER ###
drush state:set system.maintenance_mode 0 -y
# drush pm:uninstall usagov_login --strict=0
drush pm-list --type=module usagov_login --pipe | grep -q "^usagov_login " && drush pm-uninstall -y usagov_login || echo "Module 'usagov_login' does not exist. Skipping uninstallation."
drush pm:uninstall usagov_login --strict=0 || true
#drush pm-list --type=module --status=enabled | grep -q "usagov_login " && drush pm-uninstall -y usagov_login || echo "Module 'usagov_login' does not exist. Skipping uninstallation."
echo "Post deploy finished!"


0 comments on commit b173def

Please sign in to comment.