feat: ai: Forbid git log inspection in commit command #187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |