docs: clarify that it is not found instead of no access #4
Workflow file for this run
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
name: Deploy docker production | |
'on': | |
push: | |
tags: | |
- '*' | |
- '!*-*' | |
workflow_dispatch: {} | |
jobs: | |
job: | |
name: Deploy docker production | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v3 | |
- name: Get version from tag | |
run: | | |
set -x | |
echo "BUILD_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
id: version | |
- name: Docker login | |
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username darkwind8 --password-stdin | |
- name: Install Darklab ssh key | |
run: | | |
mkdir ~/.ssh | true | |
echo "${{ secrets.SSH_KEY_BASE64 }}" | base64 --decode > ~/.ssh/id_rsa | |
echo "Host darkbot" > ~/.ssh/config | |
echo " HostName 37.27.207.42" >> ~/.ssh/config | |
echo " User root" >> ~/.ssh/config | |
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config | |
echo " IdentitiesOnly yes" >> ~/.ssh/config | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/* | |
ssh-keyscan -H 37.27.207.42 >> ~/.ssh/known_hosts | true | |
ssh-keyscan -H darkbot >> ~/.ssh/known_hosts | true | |
- name: Build image darkwind8/darkstat | |
run: | | |
set -ex | |
export tag_version=${{ steps.version.outputs.BUILD_VERSION }} | |
docker build --build-arg "BUILD_VERSION=$tag_version" --tag darkwind8/darkstat:$tag_version . | |
docker tag darkwind8/darkstat:$tag_version darkwind8/darkstat:production | |
docker push darkwind8/darkstat:$tag_version | |
sleep 5 | |
docker push darkwind8/darkstat:production | |
sleep 5 | |
- name: Switch service image darkwind8/darkstat for swarm to new one | |
run: | | |
set -ex | |
docker pull darkwind8/darkstat:production | |
sleep 5 | |
docker service update --image darkwind8/darkstat:production darkstat-production | |
env: | |
DOCKER_HOST: ssh://root@darkbot |