corrected singing to use the digest #8
This file contains 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: build-twitch-alerts | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
uses: sigstore/[email protected] | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DH_USERNAME }} | |
password: ${{ secrets.DH_PASSWORD }} | |
- | |
name: Build and push API | |
id: build-and-push | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./ | |
push: true | |
tags: nullchannel/twitch-alerts:${{ github.sha }} | |
- name: Sign the images with GitHub OIDC Token | |
run: | | |
cosign sign --yes "nullchannel/twitch-alerts:${{ github.sha }}@${{ steps.build-and-push.outputs.digest }}" | |