[BE] Update action versions #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test setup ssh | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/test-setup-ssh.yml | |
- .github/actions/setup-ssh/action.yml | |
- .github/actions/setup-ssh/index.js | |
- setup-ssh/** | |
workflow_dispatch: | |
jobs: | |
build: # make sure build/ci work properly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
cd setup-ssh | |
yarn install | |
- run: | | |
cd setup-ssh | |
yarn run all | |
test-linux: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-ssh | |
name: Check if can write keys | |
with: | |
github-secret: ${{ secrets.GITHUB_TOKEN }} | |
activate-with-label: false | |
instructions: "First install, username is %%username%%" | |
- uses: ./.github/actions/setup-ssh | |
name: Check if can overwrite keys | |
with: | |
github-secret: ${{ secrets.GITHUB_TOKEN }} | |
activate-with-label: false | |
- name: Check SSH key is there | |
if: (github.event_name == 'pull_request') | |
run: | | |
test -e ~/.ssh/authorized_keys | |
# Check that file contents match, strip trailing newline from curl call | |
diff \ | |
<(curl -fsSL "https://github.com/${{ github.actor}}.keys" | sed -z '$ s/\n$//') \ | |
~/.ssh/authorized_keys | |
- name: Check SSH key is not there | |
if: (github.event_name == 'push') | |
run: | | |
# Check that file does not exist for push | |
test -e ~/.ssh/authorized_keys || exit 0 | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-ssh | |
name: Check if can write keys | |
with: | |
github-secret: ${{ secrets.GITHUB_TOKEN }} | |
activate-with-label: false | |
instructions: "SSH with rdesktop using ssh -L 3389:localhost:3389 %%username%%@%%hostname%%" | |
- uses: ./.github/actions/setup-ssh | |
name: Check if can overwrite keys | |
with: | |
github-secret: ${{ secrets.GITHUB_TOKEN }} | |
activate-with-label: false |