aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/run.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-08-09 10:26:16 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-08-09 10:26:16 +0300
commit0922d95d8291096e3786001d23dfcad0d157201c (patch)
treefec2aa3870987a1039616a29899c64559697050a /.github/workflows/run.yml
parentinitial commit (diff)
downloadmaintenance-0922d95d8291096e3786001d23dfcad0d157201c.tar.gz
maintenance-0922d95d8291096e3786001d23dfcad0d157201c.zip
add GitHub Actions workflow
Diffstat (limited to '')
-rw-r--r--.github/workflows/run.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml
new file mode 100644
index 0000000..8d42674
--- /dev/null
+++ b/.github/workflows/run.yml
@@ -0,0 +1,30 @@
+name: Run
+
+on:
+ workflow_dispatch:
+
+jobs:
+ run:
+ name: Run
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up WireGuard
+ uses: egor-tensin/setup-wireguard@v1
+ with:
+ endpoint: '${{ secrets.ENDPOINT }}'
+ endpoint_public_key: '${{ secrets.ENDPOINT_PUBLIC_KEY }}'
+ ips: '${{ secrets.IPS }}'
+ allowed_ips: '${{ secrets.ALLOWED_IPS }}'
+ private_key: '${{ secrets.WG_PRIVATE_KEY }}'
+ preshared_key: '${{ secrets.WG_PRESHARED_KEY }}'
+ - name: Set SSH key
+ run: |
+ touch .ansible-key
+ chmod 0600 .ansible-key
+ cat <<'EOF' > .ansible-key
+ ${{ secrets.SSH_KEY }}
+ EOF
+ - name: Run Ansible play
+ run: ansible-playbook --inventory inventory.ini --private-key .ansible-key maintenance.yml