Create SECURITY.md #5
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: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
IMAGE: ghcr.io/becojo/math-homeworks:latest | |
COSIGN_EXPERIMENTAL: 1 | |
jobs: | |
build: | |
permissions: | |
packages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
run: docker build . --file Dockerfile --tag "$IMAGE" | |
- name: Push image | |
run: docker push "$IMAGE" | |
- uses: sigstore/cosign-installer@main | |
- name: Sign the images | |
run: | | |
cosign sign "$IMAGE" | |
- name: Verify the pushed tags | |
run: | | |
cosign verify "$IMAGE" | |