Skip to content

Commit 7897a18

Browse files
committed
chore(ci): build/push docker img on release
Signed-off-by: Ricardo Arturo Cabral Mejía <[email protected]>
1 parent 1722b0e commit 7897a18

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
54
release:
65
types: [published]
6+
workflow_dispatch:
77

88
jobs:
99
build-and-push-image:
@@ -36,26 +36,3 @@ jobs:
3636
push: true
3737
tags: ${{ steps.meta.outputs.tags }}
3838
labels: ${{ steps.meta.outputs.labels }}
39-
deploy:
40-
name: Deploy
41-
runs-on: ubuntu-latest
42-
environment: deployment
43-
env:
44-
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
45-
steps:
46-
- name: Checkout repository
47-
uses: actions/checkout@v3
48-
- name: Setup SSH key
49-
run: |
50-
ssh-agent -t 60 -a $SSH_AUTH_SOCK > /dev/null
51-
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
52-
- name: Setup known hosts
53-
run: mkdir -p ~/.ssh && chmod 700 ~/.ssh && ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
54-
- name: Setup SSH config
55-
run: |
56-
mkdir -p ~/.ssh/sockets && chmod 700 ~/.ssh/sockets
57-
echo "Host *\n User ${{ secrets.SSH_USER }}\n ForwardAgent yes\n ControlMaster auto\n ControlPath ~/.ssh/sockets/%r@%h-%p\n ControlPersist 600" >> ~/.ssh/config
58-
chmod 600 ~/.ssh/config
59-
- name: Deploy
60-
run: |
61-
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -o SendEnv=GITHUB_REF_NAME "cd /srv/nostr-ts-relay && git fetch -va origin && git checkout --progress --force -B $GITHUB_REF_NAME refs/remotes/origin/$GITHUB_REF_NAME && source ~/.nvm/nvm.sh && nvm use && npm run tor:docker:compose:start -- --detach"

0 commit comments

Comments
 (0)