Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pantheon-systems/action-autotag@v0
- uses: pantheon-systems/action-autotag@v1
with:
gh-token: ${{ github.token }}
gh-token: ${{ github.token }}
push-major-version-branch: true
61 changes: 45 additions & 16 deletions .github/workflows/test-terminus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,62 @@
- main

jobs:
test_terminus:
test-with-login:
runs-on: ubuntu-latest
name: Terminus Setup
name: Test with Authentication
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terminus
uses: ./

- name: Expect terminus command to be available
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN_CI }}
- name: Terminus Command is available
run: terminus -V

- name: Who Am I?
run: terminus auth:whoami
- name: Expect terminus to print art
run: terminus art

test_terminus_login:
test-using-cache:
runs-on: ubuntu-latest
name: Terminus Login
name: Test Cache is Used
needs: test-with-login
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terminus
uses: ./

- name: Checkout
uses: actions/checkout@v4
- name: Setup Terminus
uses: ./
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN_CI }}
- name: Terminus Command is available
run: terminus -V
- name: Who Am I?
run: terminus auth:whoami
# TODO: Assert Cache used
- name: Fail if Cache Not Recovered
if: ${{ steps.test-with-login.outputs.session_found == 'false' }}
run: exit 1
test-cache-not-used-when-disabled:
runs-on: ubuntu-latest
name: Test Cache is ignored when disabled
needs: test-with-login
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terminus
uses: ./
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN_CI }}
disable-cache: true
- name: Terminus Command is available
run: terminus -V
- name: Who Am I?
run: terminus auth:whoami
- name: Fail if Cache Recovered and Used
if: ${{ steps.test-with-login.outputs.session_found == 'true' }}
run: exit 1

test_terminus_version:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Terminus Version
uses: ./.github/workflows/test-terminus-version.yml

Expand All @@ -47,4 +76,4 @@
uses: ./.github/workflows/test-terminus-version.yml
with:
php-version: 7.4
terminus-version: 2.6.6
terminus-version: 2.6.6
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inputs:
required: false
default: false

outputs:
session_found:
description: "Whether a valid session was found from the cache and used"
value: ${{ steps.decrypt.outputs.session_found }}

runs:
using: composite
steps:
Expand Down