Skip to content

Initial code freeze 241106 #1

Initial code freeze 241106

Initial code freeze 241106 #1

Workflow file for this run

name: Build BA Torment backend Docker image
on:
workflow_dispatch:
push:
branches:
- main
paths:
- Dockerfile.batorment
- ba-torment-api/**
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU dependency
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT_DEVOPS }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/BeaverHouse/ba-torment-backend
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.batorment
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64
- name: Checkout helm chart private repo
uses: actions/checkout@v4
with:
repository: BeaverHouse/helm-charts
token: ${{ secrets.GH_PAT_DEVOPS }}
- name: Change values.yaml
uses: mikefarah/yq@master
with:
cmd: yq -i '.image.tag = "${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"' ba-torment/values.yaml
- name: Push to main branch
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.GH_PAT_DEVOPS }}
with:
source-directory: "."
destination-github-username: "BeaverHouse"
destination-repository-name: "helm-charts"
user-email: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
target-branch: main
commit-message: "BA Torment backend image update: ${{ steps.meta.outputs.tags }}"