diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 9000449..94b596b 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -12,6 +12,7 @@ jobs: 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 }} \ No newline at end of file + gh-token: ${{ github.token }} + push-major-version-branch: true \ No newline at end of file diff --git a/.github/workflows/test-terminus.yml b/.github/workflows/test-terminus.yml index 8c6fda3..b9f7287 100644 --- a/.github/workflows/test-terminus.yml +++ b/.github/workflows/test-terminus.yml @@ -6,32 +6,61 @@ on: - 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: name: Terminus Version uses: ./.github/workflows/test-terminus-version.yml @@ -47,4 +76,4 @@ jobs: uses: ./.github/workflows/test-terminus-version.yml with: php-version: 7.4 - terminus-version: 2.6.6 + terminus-version: 2.6.6 \ No newline at end of file diff --git a/action.yml b/action.yml index b7668cd..68b959f 100644 --- a/action.yml +++ b/action.yml @@ -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: