-
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 2.36 KB
/
Copy pathworkflow.yml
File metadata and controls
68 lines (57 loc) · 2.36 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build and Deploy
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: ilyvion-contrib/ci-utils/container-build@main
with:
image: questionablextensions
- name: Upload artifact
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: questionablextensions-tar
path: questionablextensions.tar
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
steps:
- uses: ilyvion-contrib/ci-utils/create-deployment@main
id: deployment
with:
ref: ${{ github.ref }}
sha: ${{ github.sha }}
environment: 'staging'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: questionablextensions-tar
- uses: ilyvion-contrib/ci-utils/setup-ssh@main
with:
ssh_known_hosts: ${{ secrets.deploy_known_hosts }}
ssh_private_key: ${{ secrets.deploy_key }}
ssh_host: ${{ secrets.deploy_target }}
ssh_port: ${{ secrets.deploy_port }}
- uses: ilyvion-contrib/ci-utils/container-deploy@main
with:
ssh_user: ${{ secrets.deploy_user }}
ssh_host: ${{ secrets.deploy_target }}
ssh_port: ${{ secrets.deploy_port }}
image: questionablextensions
- uses: ilyvion-contrib/ci-utils/update-deployment-status@main
if: success()
with:
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
state: success
- uses: ilyvion-contrib/ci-utils/update-deployment-status@main
if: failure()
with:
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
state: failure
- uses: geekyeggo/delete-artifact@v6
with:
name: questionablextensions-tar
failOnError: false