Repository navigation
chore: release v0.8.0 #45
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 Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| jobs: | |
| push_to_registry: | |
| name: Push Image to GitHub | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Log in to the image registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Image | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: | | |
| ghcr.io/sayanarijit/settingspec | |
| - name: Build and push image | |
| id: push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - name: Generate artifact attestation | |
| uses: actions/attest@v4 | |
| with: | |
| subject-name: ghcr.io/sayanarijit/settingspec | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true |