Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 444b5efd39 | |||
| 83911b842f |
@@ -9,6 +9,9 @@ on:
|
|||||||
dockerfile_path:
|
dockerfile_path:
|
||||||
type: string
|
type: string
|
||||||
default: "."
|
default: "."
|
||||||
|
floating_tag:
|
||||||
|
type: string
|
||||||
|
default: "edge"
|
||||||
run_image_scan:
|
run_image_scan:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
@@ -68,6 +71,11 @@ jobs:
|
|||||||
-t "${FULL_IMAGE}:${SHA_SHORT}" \
|
-t "${FULL_IMAGE}:${SHA_SHORT}" \
|
||||||
${{ inputs.dockerfile_path }}
|
${{ inputs.dockerfile_path }}
|
||||||
|
|
||||||
|
# Floating tag points at the most recent build on any branch/tag, so
|
||||||
|
# the nightly image-security scan always has a stable target even
|
||||||
|
# before a release exists. ":latest" stays release-only (below).
|
||||||
|
docker tag "${FULL_IMAGE}:${SHA_SHORT}" "${FULL_IMAGE}:${{ inputs.floating_tag }}"
|
||||||
|
|
||||||
if echo "${{ gitea.ref }}" | grep -q '^refs/tags/v'; then
|
if echo "${{ gitea.ref }}" | grep -q '^refs/tags/v'; then
|
||||||
VERSION="${{ gitea.ref_name }}"
|
VERSION="${{ gitea.ref_name }}"
|
||||||
VERSION="${VERSION#v}"
|
VERSION="${VERSION#v}"
|
||||||
@@ -143,6 +151,9 @@ jobs:
|
|||||||
echo "=== Push SHA tag ==="
|
echo "=== Push SHA tag ==="
|
||||||
docker push "${FULL_IMAGE}:${SHA_SHORT}"
|
docker push "${FULL_IMAGE}:${SHA_SHORT}"
|
||||||
|
|
||||||
|
echo "=== Push floating tag (${{ inputs.floating_tag }}) ==="
|
||||||
|
docker push "${FULL_IMAGE}:${{ inputs.floating_tag }}"
|
||||||
|
|
||||||
if echo "${{ gitea.ref }}" | grep -q '^refs/tags/v'; then
|
if echo "${{ gitea.ref }}" | grep -q '^refs/tags/v'; then
|
||||||
echo "=== Version tag detected ==="
|
echo "=== Version tag detected ==="
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
image_tag:
|
image_tag:
|
||||||
type: string
|
type: string
|
||||||
default: "latest"
|
default: "edge"
|
||||||
scan_severity:
|
scan_severity:
|
||||||
type: string
|
type: string
|
||||||
default: "HIGH,CRITICAL"
|
default: "HIGH,CRITICAL"
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ on:
|
|||||||
run_security_scan:
|
run_security_scan:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
use_private_index:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@@ -35,6 +38,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Configure private package index
|
||||||
|
if: ${{ inputs.use_private_index }}
|
||||||
|
env:
|
||||||
|
PRIVATE_INDEX_URL: ${{ secrets.PIP_EXTRA_INDEX_URL }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$PRIVATE_INDEX_URL" ]; then
|
||||||
|
echo "use_private_index=true but the PIP_EXTRA_INDEX_URL secret is empty or not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pip config --site set global.extra-index-url "$PRIVATE_INDEX_URL"
|
||||||
|
|
||||||
- name: Install Tools & Deps
|
- name: Install Tools & Deps
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
|||||||
Reference in New Issue
Block a user