c61938d99f18424cef3ea9c4fbbb7c5cb4141f58

Author
Ayman Bagabas <ayman.bagabas@gmail.com>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

Push repo to beta.charm.sh

Diff

 1diff --git a/.github/workflows/soft-serve.yml b/.github/workflows/soft-serve.yml
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..153dda9d1c166b678b6d709547caf3e316083863
 4--- /dev/null
 5+++ b/.github/workflows/soft-serve.yml
 6@@ -0,0 +1,36 @@
 7+name: Soft-Serve
 8+
 9+on:
10+  push:
11+    branches:
12+      - main
13+
14+jobs:
15+  softserve:
16+    runs-on: ubuntu-latest
17+    env:
18+      CHARM_SOFT_SERVE_KEY: "${{ secrets.CHARM_SOFT_SERVE_KEY }}"
19+      SERVER: beta.charm.sh
20+      SSH_AUTH_SOCK: /tmp/ssh_agent.sock
21+      PUSH_TO: "soft-serve"
22+
23+    steps:
24+      - name: Checkout code
25+        uses: actions/checkout@v2
26+        with:
27+          fetch-depth: 0
28+
29+      - name: Push to Soft-Serve
30+        run: |
31+          # Add ssh key
32+          mkdir -p ~/.ssh
33+          ssh-keyscan $SERVER >> ~/.ssh/known_hosts
34+          echo "$CHARM_SOFT_SERVE_KEY" > ~/.ssh/charm_soft_serve_id_rsa
35+          chmod 0600 ~/.ssh/charm_soft_serve_id_rsa
36+          eval "$(ssh-agent -a $SSH_AUTH_SOCK)"
37+          ssh-add ~/.ssh/charm_soft_serve_id_rsa
38+          # Add remote
39+          git remote add soft-serve ssh://$SERVER/$PUSH_TO
40+          # Push to soft-serve
41+          git push -f soft-serve HEAD:master
42+          rm -rf ~/.ssh/charm_soft_serve_id_rsa