File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,6 @@ This action requires:
2525## Usage
2626
2727``` yaml
28- env :
29- PROJECT_ID : ' ${{ secrets.GCP_PROJECT }}'
30- ZONE : ' us-central1-a'
31-
3228jobs :
3329 job_id :
3430 permissions :
4844 uses : ' google-github-actions/ssh-compute@v0'
4945 with :
5046 instance_name : ' example-instance'
51- zone : ' ${{ env.ZONE }} '
47+ zone : ' us-central1-a '
5248 ssh_private_key : ' ${{ secrets.GCP_SSH_PRIVATE_KEY }}'
5349 command : ' echo Hello world'
5450
@@ -147,9 +143,6 @@ authenticate requests as the service account attached to the instance. **This
147143only works using a custom runner hosted on GCP.**
148144
149145` ` ` yaml
150- env:
151- ZONE: 'us-central1-a'
152-
153146jobs:
154147 job_id:
155148 steps:
@@ -159,7 +152,7 @@ jobs:
159152 uses: 'google-github-actions/ssh-compute@v0'
160153 with:
161154 instance_name: 'example-instance'
162- zone: '${{ env.ZONE }} '
155+ zone: 'us-central1-a '
163156 ssh_private_key: '${{ secrets.GCP_SSH_PRIVATE_KEY }}'
164157 command: 'echo Hello world'
165158` ` `
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import * as setupGcloud from '@google-github-actions/setup-cloud-sdk';
66import { expect } from 'chai' ;
77import { run , parseFlags } from '../../src/main' ;
88import { run as postRun } from '../../src/post' ;
9+ import { EOL } from 'os' ;
910
1011import { promises as fs } from 'fs' ;
1112
@@ -188,7 +189,7 @@ describe('#ssh-compute', function () {
188189 const call = this . stubs . getExecOutput . getCall ( 0 ) ;
189190 expect ( call ) . to . be ;
190191 const args = call . args [ 1 ] ;
191- expect ( args ) . to . include . members ( [ ' bash -c \"echo 1\necho 2\necho 3\"' ] ) ;
192+ expect ( args ) . to . include . members ( [ ` bash -c \"echo 1${ EOL } echo 2 ${ EOL } echo 3\"` ] ) ;
192193 } ) ;
193194
194195 it ( 'sets the correct ssh args if provided' , async function ( ) {
@@ -219,7 +220,7 @@ describe('#ssh-compute', function () {
219220 expect ( this . stubs . info . withArgs ( 'Skipping ssh keys directory cleanup' ) . callCount ) . to . eq ( 1 ) ;
220221 expect ( this . stubs . rm . callCount ) . to . eq ( 0 ) ;
221222 } ) ;
222-
223+
223224 it ( 'deletes the file if env is set in the run function' , async function ( ) {
224225 await run ( ) ;
225226 await postRun ( ) ;
You can’t perform that action at this time.
0 commit comments