Skip to content

Build and Push Version #8

Build and Push Version

Build and Push Version #8

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"