-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e91d12b
commit c61938d
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Soft-Serve | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
softserve: | ||
runs-on: ubuntu-latest | ||
env: | ||
CHARM_SOFT_SERVE_KEY: "${{ secrets.CHARM_SOFT_SERVE_KEY }}" | ||
SERVER: beta.charm.sh | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
PUSH_TO: "soft-serve" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Push to Soft-Serve | ||
run: | | ||
# Add ssh key | ||
mkdir -p ~/.ssh | ||
ssh-keyscan $SERVER >> ~/.ssh/known_hosts | ||
echo "$CHARM_SOFT_SERVE_KEY" > ~/.ssh/charm_soft_serve_id_rsa | ||
chmod 0600 ~/.ssh/charm_soft_serve_id_rsa | ||
eval "$(ssh-agent -a $SSH_AUTH_SOCK)" | ||
ssh-add ~/.ssh/charm_soft_serve_id_rsa | ||
# Add remote | ||
git remote add soft-serve ssh://$SERVER/$PUSH_TO | ||
# Push to soft-serve | ||
git push -f soft-serve HEAD:master | ||
rm -rf ~/.ssh/charm_soft_serve_id_rsa |