connect_node sleep for 1 sec to allow connection finish #78
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: Build Docker image and push to Dockerhub | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Docker image tag name | |
run: | | |
if [ "${{ github.ref_name }}" = "main" ]; then | |
echo "DOCKER_TAG_NAME=latest" >> $GITHUB_ENV | |
else | |
echo "DOCKER_TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV | |
fi | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ github.repository }}:${{ env.DOCKER_TAG_NAME }} | |
- name: Push README to Dockerhub | |
uses: peter-evans/dockerhub-description@v3 | |
if: github.ref_name == 'main' | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
short-description: ${{ github.event.repository.description }} | |
enable-url-completion: true |