-
-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (46 loc) · 1.43 KB
/
deploy.yml
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
49
50
51
52
53
54
name: 'Deploy'
on:
push:
branches:
- main
repository_dispatch:
types: [ deploy ]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: tidev/titaniumsdk.com
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to private registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.TIDEV_REGISTRY_URL }}
username: ${{ secrets.TIDEV_REGISTRY_USERNAME }}
password: ${{ secrets.TIDEV_REGISTRY_PASSWORD }}
- name: Build and push
id: build
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push to dokku
uses: dokku/github-action@master
with:
deploy_docker_image: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }}@${{ steps.build.outputs.digest }}
git_push_flags: '--force'
git_remote_url: 'ssh://[email protected]:22/titaniumsdk.com'
ssh_private_key: ${{ secrets.DO_SSH_PRIVATE_KEY }}