-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·77 lines (62 loc) · 2.24 KB
/
build-and-push.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build and Push Version
on:
# push:
# branches:
# - main
# pull_request:
# types:
# - opened
# - assigned
# paths:
# - "docker/image_version.txt"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build-and-push:
runs-on: [self-hosted, linux, gpu]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
show-progress: true
set-safe-directory: '/'
- name: Read the image version
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./docker/image_version.txt
- name: Matrix Message - Starting Build
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "Completed FacsimiLab image build for tag ${{ steps.package.outputs.content }}"
server: "matrix.drpranavmishra.com"
- name: Build Docker images
run: bash docker/build-all.sh
- name: Matrix Message - Completed Build
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "Completed FacsimiLab image build for tag ${{ steps.package.outputs.content }}"
server: "matrix.drpranavmishra.com"
- name: Push Docker images
run: bash docker/push-all.sh
- name: Write to workflow job summary
run: |
build_version=$(cat docker/image_version.txt)
builder_header="# $build_version "
echo "$builder_header" > testing/results/job_summary.md
cat testing/results/job_summary.md >> $GITHUB_STEP_SUMMARY
- name: Matrix Message - Completed GitHub Action
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "Completed FacsimiLab build github action for tag ${{ steps.package.outputs.content }}"
server: "matrix.drpranavmishra.com"