Skip to content

feat: ai: Forbid git log inspection in commit command #187

feat: ai: Forbid git log inspection in commit command

feat: ai: Forbid git log inspection in commit command #187

name: Push Docker image for Dotfiles Generator
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-and-push:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
commit="$(git rev-parse HEAD)"
docker build . \
--tag ghcr.io/${{ github.repository_owner }}/dotfiles:"$commit" \
--file bootstrap/Dockerfile
if [ "${{github.event_name}}" != "pull_request" ]; then
docker tag ghcr.io/${{ github.repository_owner }}/dotfiles:"$commit" ghcr.io/${{ github.repository_owner }}/dotfiles:latest
fi
- name: Push the image to GHCR
run: |
commit="$(git rev-parse HEAD)"
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push ghcr.io/${{ github.repository_owner }}/dotfiles:"$commit"
if [ "${{github.event_name}}" != "pull_request" ]; then
docker push ghcr.io/${{ github.repository_owner }}/dotfiles:latest
fi