-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.14 KB
/
Copy pathdeploy.yml
File metadata and controls
48 lines (40 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: delivery
on:
push:
branches:
- develop
env:
IMAGE_NAME: ghcr.io/civictechdc/deltatrack
permissions:
contents: read
packages: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Docker Tag
run: echo "GIT_REV=$(git rev-parse --short HEAD)" > "$GITHUB_ENV"
- name: Build and Push Docker Image
uses: iloveitaly/github-action-railpack@1.0
with:
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}
${{ env.IMAGE_NAME }}:${{ env.GIT_REV }}
- name: Push to Dokku
uses: dokku/github-action@v1.10.0
with:
git_remote_url: ${{ secrets.GIT_REMOTE_URL }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
deploy_docker_image: ${{ env.IMAGE_NAME }}:${{ env.GIT_REV }}