Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Bump appleboy/ssh-action from 1.0.0 to 1.0.1 #123

Bump appleboy/ssh-action from 1.0.0 to 1.0.1

Bump appleboy/ssh-action from 1.0.0 to 1.0.1 #123

Workflow file for this run

name: Docker
on:
push:
branches: 'master'
pull_request:
types: [opened, reopened, synchronize]
branches: [master]
workflow_dispatch:
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Build the Docker image
run: docker build --file Dockerfile --tag ${{ github.repository}}:$(git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g') .
publish-image:
runs-on: ubuntu-latest
needs: build-image
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Publish to registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
deploy-production:
runs-on: ubuntu-latest
needs: publish-image
if: github.ref == 'refs/heads/master'
environment: "production"
steps:
- name: Execute deployment on SSH
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: /tank/containers/deploy/pohles-api.sh
# deploy-dev:
# runs-on: ubuntu-latest
# if: github.ref != 'refs/heads/master'
# environment: "dev"
# steps:
# - name: Execute deployment on SSH
# uses: appleboy/ssh-action@v1.0.1
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USERNAME }}
# key: ${{ secrets.SSH_KEY }}
# port: ${{ secrets.SSH_PORT }}
# script: /tank/containers/deploy/pohles-api-dev.sh ${{ github.head_ref || github.ref_name }}