Bump actions/create-github-app-token from 1.11.2 to 1.11.3 (#282) #279
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: Publish Container image to DockerHub | |
on: | |
push: | |
branches: | |
- 'master' | |
paths-ignore: | |
- '*.md' | |
permissions: | |
contents: read | |
jobs: | |
docker: | |
name: Push Docker image to DockerHub | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # needed for signing the images with GitHub OIDC Token | |
attestations: write | |
# Needed to upload the results to code-scanning dashboard. | |
security-events: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 | |
- name: Install cosign | |
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 | |
- name: Inspect builder | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
- name: Log in to DockerHub | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Generate data time for docker tag | |
id: datatime | |
run: echo "DATETIME=$(date +'%Y%m%d%H%M')" >> "${GITHUB_OUTPUT}" | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0 | |
with: | |
context: . | |
push: true | |
sbom: true | |
platforms: linux/amd64,linux/arm64 | |
tags: patrickfmarques/ifconfig.me:1.0.0-${{ steps.datatime.outputs.DATETIME }} | |
- name: Sign the images with GitHub OIDC Token | |
env: | |
DIGEST: ${{ steps.docker_build.outputs.digest }} | |
TAGS: patrickfmarques/ifconfig.me | |
run: cosign sign --yes "${TAGS}@${DIGEST}" | |
- name: Attest | |
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0 | |
id: attest | |
with: | |
subject-name: index.docker.io/patrickfmarques/ifconfig.me | |
subject-digest: ${{ steps.docker_build.outputs.digest }} | |
push-to-registry: true | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- name: Run Snyk to check Docker image for vulnerabilities | |
continue-on-error: true | |
uses: snyk/actions/docker@b98d498629f1c368650224d6d212bf7dfa89e4bf #v0.4.0 | |
env: | |
# In order to use the Snyk Action you will need to have a Snyk API token. | |
# More details in https://github.com/snyk/actions#getting-your-snyk-token | |
# or you can signup for free at https://snyk.io/login | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
image: patrickfmarques/ifconfig.me:1.0.0-${{ steps.datatime.outputs.DATETIME }} | |
args: --file=Dockerfile | |
- name: Upload result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@0b21cf2492b6b02c465a3e5d7c473717ad7721ba # v3.23.1 | |
with: | |
sarif_file: snyk.sarif |