Skip to content

Add workflows for building and promoting security images #1

Add workflows for building and promoting security images

Add workflows for building and promoting security images #1

name: Build Security Image
on:
push:
branches:
- 'secure/*'
create:
jobs:
variables-setup:
name: Setting variables for docker build
runs-on: ubuntu-latest
if: >-
github.event_name == 'push' ||
(
github.event_name == 'create' &&
github.event.ref_type == 'branch' &&
startsWith(github.ref_name, 'secure/')
)
steps:
- name: Create variables
id: vars
run: |
echo "image-tag=$(echo '${{ github.ref_name }}' | sed 's|secure/||')" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
outputs:
image-tag: ${{ steps.vars.outputs.image-tag }}
date: ${{ steps.vars.outputs.date }}
build-security-image:
name: Build security Docker image
needs: variables-setup
uses: reportportal/.github/.github/workflows/build-docker-image.yaml@main
with:
aws-region: ${{ vars.AWS_REGION }}
build-platforms: ${{ vars.BUILD_PLATFORMS || 'linux/amd64,linux/arm64' }}
image-tag: ${{ needs.variables-setup.outputs.image-tag }}
release-mode: false
additional-tag: 'secure-latest'
date: ${{ needs.variables-setup.outputs.date }}
runs-on: ubuntu-latest
secrets: inherit