Skip to content

Initial code freeze 241109 #1

Initial code freeze 241109

Initial code freeze 241109 #1

Workflow file for this run

name: Build file server Docker image
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "src/**"
- "Cargo.*"
- "Dockerfile"
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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/${{ github.repository }}
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- 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'] }}"' file-server/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: "File server image update: ${{ steps.meta.outputs.tags }}"