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

Use terminus-github-actions and Sage install script cleanup #123

Merged
merged 18 commits into from
May 6, 2024

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented May 6, 2024

  • replaces (deprecated, duplicate) pantheon-systems/action-install-terminus with pantheon-systems/terminus-github-actions
  • updates the output of the composer-diff comment
  • generates a random theme name for the sage install (rather than just sage-test)
  • adds a wait step before switching to sftp mode for the add_symlink step
  • checks if the /files/cache directory exists before creating it
  • updates multisite check logic to use wp config is-true (rather than running theme enable regardless)
  • bails early if running in CI (last several steps are not needed for CI testing)

@jazzsequence jazzsequence requested review from a team as code owners May 6, 2024 19:44
Copy link
Member

@pwtyler pwtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR needs a description. Couple of minor cleanup suggestions at your discretion. Still ✅

private/scripts/helpers.sh Outdated Show resolved Hide resolved
private/scripts/helpers.sh Outdated Show resolved Hide resolved
cd /files
mkdir cache
# Create a files/cache directory on the host if one does not already exist.
if [ "$(sftp -P 2222 "$sftpuser"@"$sftphost" <<< "ls /files" | grep -c "^cache$")" -eq 0 ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice if this is done with exit codes instead but maybe not worth the effort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sold on this yet as it still is getting a folder creation error in CI. Pretty sure this works if the script is run normally though and the script doesn't fail so ¯_(ツ)_/¯

@jazzsequence jazzsequence changed the title Use terminus-github-actions Use terminus-github-actions and Sage install script cleanup May 6, 2024
@jazzsequence jazzsequence changed the title Use terminus-github-actions and Sage install script cleanup Use terminus-github-actions and Sage install script cleanup May 6, 2024
@jazzsequence jazzsequence merged commit cc74108 into main May 6, 2024
11 checks passed
@jazzsequence jazzsequence deleted the use-terminus-github-actions branch May 6, 2024 22:27
jazzsequence added a commit that referenced this pull request Jul 31, 2024
* put composer diff into a details block

* use terminus-github-actions

* skip things for CI-only runs

* skip multisite stuff if we're not on multisite

* add a workflow:wait to wait for the commit to finish before switching to sftp

* bail early if CI
rather than continuing if _not_ CI

* check if is_multisite is 1
rather than anything, we might get weird output if it's not true

* only create the directory if it doesn't exist

* wrap statement in quotes

* verbose output and ls the contents of /files

* log that we're checking for multisite
so it looks slightly less weird that we're erroring if it's not

* remove =""

* use config is-true rather than config get

* genrenate a random theme name

* change our grep pattern

* use `config is-true` directly

* replace spaces with hyphens

* remove non alphanumeric characters
this will skip weird stuff and make the output more consistent
jazzsequence added a commit that referenced this pull request Aug 1, 2024
* put composer diff into a details block

* use terminus-github-actions

* skip things for CI-only runs

* skip multisite stuff if we're not on multisite

* add a workflow:wait to wait for the commit to finish before switching to sftp

* bail early if CI
rather than continuing if _not_ CI

* check if is_multisite is 1
rather than anything, we might get weird output if it's not true

* only create the directory if it doesn't exist

* wrap statement in quotes

* verbose output and ls the contents of /files

* log that we're checking for multisite
so it looks slightly less weird that we're erroring if it's not

* remove =""

* use config is-true rather than config get

* genrenate a random theme name

* change our grep pattern

* use `config is-true` directly

* replace spaces with hyphens

* remove non alphanumeric characters
this will skip weird stuff and make the output more consistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants