-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.49 KB
/
docker-image-pr.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
55
56
name: Docker Image CI
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU dependency
uses: docker/setup-qemu-action@v1
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/mythic-web:pr
- name: Send update message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
mythic-web:pr docker image updated
- name: Update rancher deployment
uses: th0th/[email protected]
with:
debug: 'true'
disable_output: 'false'
rancher_bearer_token: ${{ secrets.RANCHER_BEARER_TOKEN }}
rancher_cluster_id: ${{ secrets.RANCHER_CLUSTER_ID }}
rancher_namespace: 'default'
rancher_project_id: ${{ secrets.RANCHER_PROJECT_ID }}
rancher_url: ${{ secrets.RANCHER_URL }}
rancher_workloads: 'mythic-pr'
tls_skip_verification: 'false'