Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

GitHub Action for setting up the Pantheon CLI tool Terminus at a specified version, if desired: https://github.com/pantheon-systems/terminus.

Notifications You must be signed in to change notification settings

ChromaticHQ/setup-pantheon-terminus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Pantheon Terminus

A Github Action for quickly installing and configuring the Pantheon CLI tool, Terminus.

Requirements

Usage

Using this action requires first setting up PHP in the workflow. Huge thanks to @shivammathur for all that legwork creating setup-php.

Please note that the PHP setup action is required before running Terminus setup.

Variables

pantheon-machine-token (required): This action will not be able to authenticate to panthon unless you pass in your Pantheon Machine Token.

terminus-version (optional): Due to your project build environment, you may need to remain on an older version of terminus. If so, you can use this variable to do so. Any version format supported by terminus's installer.phar will work. Here is an example:

- name: Installing Terminus
  uses: chromatichq/setup-pantheon-terminus@master
  with:
    pantheon-machine-token: YOUR_TOKEN
    terminus-version: 2.6.1

Workflow Example

The following is a Github Workflow example which will install PHP and Terminus, then output the sites on Pantheon for that account.

name: Setup Terminus

on:
  push:
    branches:
    - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Installing PHP
      uses: shivammathur/setup-php@master
      with:
        php-version: '7.3'
    - name: Installing Terminus
      uses: kopepasah/setup-pantheon-terminus@master
      with:
        pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
    - name: Listing Sites
      if: success()
      run: terminus site:list

In the above example, PANTHEON_MACHINE_TOKEN is an encrypted secret added to the repo on Github, of which the value is the Machine Token generated by Pantheon.

Node Modules Directory?

Yes, the node_modules directory was commited to this repo on purpose. Github actions requires these modules in order to run and I chose to include the Node modules in lieu of bundling all the modules into one file.

About

GitHub Action for setting up the Pantheon CLI tool Terminus at a specified version, if desired: https://github.com/pantheon-systems/terminus.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%