Skip to content

Kspider Docker Image CI #5

Kspider Docker Image CI

Kspider Docker Image CI #5

Workflow file for this run

name: Kspider Docker Image CI
on:
release:
types: [published]
permissions:
packages: write
contents: read
attestations: write
id-token: write
jobs:
build_push_dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
id: build_push_dockerhub
with:
file: Dockerfile
push: true
tags: |
${{ github.repository }}:latest
${{ github.repository }}:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.build_push_dockerhub.outputs.digest }}
push-to-registry: true