Add the runner IP in your o2switch whitelist for later remote access.
- Retrieve the runner IP (using
haythem/[email protected]
) - URL encode your password
- Supports 2FA
Key | Required | Default | Description |
---|---|---|---|
o2switch_username |
true |
The o2switch username. | |
o2switch_password |
true |
The o2switch password. | |
o2switch_host |
true |
The o2switch host. | |
otp_secret |
false |
null |
The OTP secret if it is enabled the o2switch account. |
ip_to_keep |
false |
'' |
The IP to keep in the whitelist. |
o2switch_password
input.
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Your own steps here
- name: Install dependencies or whatever you need to do
- name: Whitelist IP address
uses: d9beuD/o2switch-whitelisting@v1
with:
otp_secret: ${{ secrets.O2SWITCH_OTP_SECRET }}
o2switch_username: ${{ secrets.O2SWITCH_USER }}
o2switch_password: ${{ secrets.O2SWITCH_PASSWORD }}
o2switch_host: ${{ secrets.O2SWITCH_HOST }}
# Example deploy step
- name: Deploy
uses: easingthemes/[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# Updates are based on file hash, not time + size
ARGS: '-rlgoDzvc -i --delete'
SOURCE: './dist/'
REMOTE_HOST: ${{ secrets.O2SWITCH_HOST }}
REMOTE_USER: ${{ secrets.O2SWITCH_USER }}
TARGET: ${{ secrets.APP_PATH }}/
We would love for you to contribute to d9beuD/o2switch-whitelisting, pull requests are welcome !