Skip to content

Commit 18b2d35

Browse files
committed
Revert github action changes.
1 parent f5ffd2d commit 18b2d35

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.github/workflows/master.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Continuous integration
33
on:
44
push:
55
branches:
6-
- BC-274-second-node
6+
- master
77

88
concurrency: master
99

@@ -111,37 +111,27 @@ jobs:
111111
if: ${{ env.CONTINUOUS_DEPLOYMENT_ENABLED == 'True' }}
112112
run: |
113113
mkdir -p ~/.ssh/
114-
echo "$DEPLOY_SSH_KEY_1" > ~/.ssh/github
115-
echo "$DEPLOY_SSH_KEY_2" >> ~/.ssh/github
114+
echo "$DEPLOY_SSH_KEY" > ~/.ssh/github
116115
chmod 600 ~/.ssh/github
117116
cat >>~/.ssh/config <<END
118-
Host target_1
119-
HostName $DEPLOY_SSH_HOST_1
120-
User $DEPLOY_SSH_USER
121-
IdentityFile ~/.ssh/github
122-
LogLevel ERROR
123-
StrictHostKeyChecking no
124-
END
125-
Host target_2
126-
HostName $DEPLOY_SSH_HOST_2
117+
Host target
118+
HostName $DEPLOY_SSH_HOST
127119
User $DEPLOY_SSH_USER
128120
IdentityFile ~/.ssh/github
129121
LogLevel ERROR
130122
StrictHostKeyChecking no
131123
END
132124
env:
133125
CONTINUOUS_DEPLOYMENT_ENABLED: ${{ secrets.NODE_CONTINUOUS_DEPLOYMENT_ENABLED }}
134-
DEPLOY_SSH_KEY_1: ${{ secrets.NODE_DEPLOY_SSH_KEY_1 }}
135-
DEPLOY_SSH_KEY_2: ${{ secrets.NODE_DEPLOY_SSH_KEY_2 }}
136-
DEPLOY_SSH_HOST_1: ${{ secrets.NODE_DEPLOY_SSH_HOST_1 }}
137-
DEPLOY_SSH_HOST_2: ${{ secrets.NODE_DEPLOY_SSH_HOST_2 }}
126+
DEPLOY_SSH_KEY: ${{ secrets.NODE_DEPLOY_SSH_KEY }}
127+
DEPLOY_SSH_HOST: ${{ secrets.NODE_DEPLOY_SSH_HOST }}
138128
DEPLOY_SSH_USER: ${{ secrets.NODE_DEPLOY_SSH_USER }}
139129

140130
- name: Run deploy
141131
# TODO(dmu) MEDIUM: Once/if github implements secrets on job level
142132
# https://github.com/actions/runner/issues/520#issuecomment-877193387
143133
if: ${{ env.CONTINUOUS_DEPLOYMENT_ENABLED == 'True' }}
144134
run: |
145-
for variables in "target_1 ${{ secrets.NODE_RUN_GENESIS }}" "target_2 False"; do vars=($variables) && target=${vars[0]} && node_run_genesis=${vars[1]} && ssh $target "docker system prune --all --volumes --force && wget https://raw.githubusercontent.com/thenewboston-developers/Node/master/scripts/deploy.sh -O /tmp/deploy-node.sh && chmod a+x /tmp/deploy-node.sh && /tmp/deploy-node.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} $node_run_genesis && rm -f /tmp/deploy-node.sh"; done
135+
ssh target "docker system prune --all --volumes --force && wget https://raw.githubusercontent.com/thenewboston-developers/Node/master/scripts/deploy.sh -O /tmp/deploy-node.sh && chmod a+x /tmp/deploy-node.sh && /tmp/deploy-node.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.NODE_RUN_GENESIS }} && rm -f /tmp/deploy-node.sh"
146136
env:
147137
CONTINUOUS_DEPLOYMENT_ENABLED: ${{ secrets.NODE_CONTINUOUS_DEPLOYMENT_ENABLED }}

0 commit comments

Comments
 (0)