fix: proper escaping of username/password #4
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: publish-container-image | |
| on: | |
| push: | |
| branches: [ main ] | |
| env: | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build the Docker image | |
| run: docker build -t ghcr.io/${{ env.IMAGE_NAME }}:latest -f Containerfile . | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push the Docker image | |
| run: docker push ghcr.io/${{ env.IMAGE_NAME }}:latest |