Files
library_updater/.github/workflows/build_docker_image.yml
Bulat Kurbanov fe8652c7d8
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
Update dependencies and improve Docker image build workflow
- Update Rust dependencies in Cargo.lock to latest versions - Tag Docker
images with both `latest` and commit SHA - Pass commit SHA as a query
parameter to deployment webhook - Refactor GitHub Actions workflow for
cleaner YAML structure
2025-06-21 22:41:15 +02:00

46 lines
1.2 KiB
YAML

name: Build docker image
on:
push:
branches:
- "main"
jobs:
Build-Docker-Image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: repository_name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
env:
IMAGE: ${{ steps.repository_name.outputs.lowercase }}
with:
push: true
platforms: linux/amd64
tags: ghcr.io/${{ env.IMAGE }}:latest,ghcr.io/${{ env.IMAGE }}:${{ github.sha }}
context: .
file: ./docker/build.dockerfile
- name: Invoke deployment hook
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}?LIBRARY_UPDATER_TAG=${{ github.sha }}