mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
Bump Docker CI action majors across docker-latest.yml, docker-release.yml, and docker-test.yml: actions/checkout v3 → v7 docker/setup-qemu-action / setup-buildx-action / login-action v3 → v4 docker/build-push-action v5 → pinned v7.3.0 (53b7df96c91f9c12dcc8a07bcb9ccacbed38856a) Attach SBOM attestations (sbom: true) and pin provenance (provenance: mode=max) on image pushes (:latest and release tags). Disable provenance on PR test builds (push: false), where registry attestations are not applicable. --------- Co-authored-by: Ajin Abraham <[email protected]> Co-authored-by: Cursor <[email protected]>
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: 'Build and Publish Release to DockerHub'
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v7
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v4
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v4
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
-
|
|
name: Get Release Tag
|
|
id: release
|
|
run: |
|
|
DOCKER_IMAGE=opensecurity/mobile-security-framework-mobsf
|
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
TAG="${DOCKER_IMAGE}:v${VERSION}"
|
|
fi
|
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
|
-
|
|
name: Build and push AMD64, ARM64 image release
|
|
id: docker_build
|
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
|
with:
|
|
push: true
|
|
provenance: mode=max
|
|
sbom: true
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: ${{ steps.release.outputs.tag }}
|