Update .github/workflows/CD.yml
This commit is contained in:
52
.github/workflows/CD.yml
vendored
52
.github/workflows/CD.yml
vendored
@ -1,33 +1,16 @@
|
|||||||
name: Deploy Project
|
name: Deploy Project
|
||||||
|
|
||||||
inputs:
|
|
||||||
Version:
|
|
||||||
description: application version that you are deploying
|
|
||||||
required: true
|
|
||||||
# GITHUB_TOKEN:
|
|
||||||
# description: token used to call workflow
|
|
||||||
# required: true
|
|
||||||
Branch:
|
|
||||||
description: github branch where CD workflow is supposed to run
|
|
||||||
required: false
|
|
||||||
default: develop
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
branches:
|
inputs:
|
||||||
- develop
|
Version:
|
||||||
paths-ignore:
|
description: Application Version
|
||||||
- 'README.md'
|
type: string
|
||||||
# - '.github/**'
|
required: true
|
||||||
# inputs:
|
Env:
|
||||||
# Version:
|
description: Deployment Environment
|
||||||
# description: Application Version
|
type: environment
|
||||||
# type: string
|
required: false
|
||||||
# required: true
|
|
||||||
# Env:
|
|
||||||
# description: Deployment Environment
|
|
||||||
# type: environment
|
|
||||||
# required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# on-success:
|
# on-success:
|
||||||
@ -46,8 +29,22 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Dump inputs context
|
||||||
|
env:
|
||||||
|
INPUTS_CONTEXT: ${{ toJson(inputs) }}
|
||||||
|
- name: Dump GitHub context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- name: Dump job context
|
||||||
|
env:
|
||||||
|
JOB_CONTEXT: ${{ toJson(job) }}
|
||||||
|
run: echo "$JOB_CONTEXT"
|
||||||
|
- name: Dump steps context
|
||||||
|
env:
|
||||||
|
STEPS_CONTEXT: ${{ toJson(steps) }}
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -64,4 +61,5 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'whoami'
|
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'whoami'
|
||||||
|
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'docker pull docker.savin.nyc/go-receipt-tracker:nightly'
|
||||||
|
|
Reference in New Issue
Block a user