fixing build pipeline to do security scan and docker build together
This commit is contained in:
@@ -1,25 +1,18 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Security
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ gitea.event.workflow_run.event == 'push' && gitea.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ gitea.event.workflow_run.head_sha }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -33,7 +26,7 @@ jobs:
|
||||
- name: Compute image tag
|
||||
id: tag
|
||||
run: |
|
||||
BRANCH="${{ gitea.event.workflow_run.head_branch }}"
|
||||
BRANCH="${{ gitea.ref_name }}"
|
||||
|
||||
if [ "$BRANCH" = "main" ]; then
|
||||
TAG="latest"
|
||||
|
||||
Reference in New Issue
Block a user