Skip to content

added build dependency #7

added build dependency

added build dependency #7

Workflow file for this run

name: Merge
on:
pull_request:
branches: [dev]
types: [closed]
concurrency:
# PR open and close use the same group, allowing only one at a time
group: pr-${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
# Find initial PR number (for merge queues)
vars:
name: Build and Deploy Vars
outputs:
tag: ${{ steps.deploys.outputs.tag }}
runs-on: ubuntu-22.04
steps:
- name: Set Variables
id: deploys
run: |
# Get PR number (different process for merge queue)
if [ ${{ github.event_name }} == 'pull_request' ]
then
tag=${{ github.event.number }}
else
tag=$(echo ${{ github.event.merge_group.head_ref }} | grep -Eo "queue/main/pr-[0-9]+" | cut -d '-' -f2)
fi
echo "Summary ---"
echo -e "\tTag (PR no): ${tag}"
echo "tag=${tag}" >> $GITHUB_OUTPUT
# https://github.com/bcgov-nr/action-builder-ghcr
builds:
name: Builds
needs: [vars]
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
package: [containers/clamav]
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
with:
keep_versions: 50
package: ${{ matrix.package }}
tag: ${{ needs.vars.outputs.tag }}
tag_fallback: latest
triggers: ('${{ matrix.package }}/')
deploys:
name: Deploys Anitvirus
needs: [builds]
environment: tools
permissions:
issues: write
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- name: clamav
file: containers/clamav/openshift/templates/clamav-dc.yaml
overwrite: false
steps:
- uses: bcgov-nr/[email protected]
with:
file: ${{ matrix.file }}
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: ${{ matrix.overwrite }}
parameters: -p ZONE=prod -p NAME=${{ github.event.repository.name }}
repository: ${{ matrix.repository }}
verification_path: ${{ matrix.verification_path }}