Skip to content

updated corn job

updated corn job #44

Workflow file for this run

name: Docker Build CI
on:
push:
tags: ['*.*']
jobs:
build-for-git:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set environment variables
run: |
echo "BUILD_PROJ=omegasync" >> $GITHUB_ENV
- name: Get Tag Version
run: |
IMAGE_TAG=${GITHUB_REF#refs/tags/}
echo "IMAGE_TAG: ${IMAGE_TAG}"
yq eval ".image.tag = \"${IMAGE_TAG}\"" -i kubernetes/prod/values.yaml
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PAT }}
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/docker-cache
key: docker-${{ github.sha }}
restore-keys: |
docker-
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/uvarc/${{ env.BUILD_PROJ }}:latest
ghcr.io/uvarc/${{ env.BUILD_PROJ }}:${{ env.IMAGE_TAG }}
- name: Push Version to Repository
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[skip ci] Update Version to Helm - ${{ env.IMAGE_TAG }}"
branch: main
file_pattern: 'kubernetes/prod/values.yaml'
commit_user_name: GitHub Actions Bot
commit_user_email: github@virginia.edu
commit_author: GitHub Actions <github@virginia.edu>