Skip to content

Chore tagging release images #2

Chore tagging release images

Chore tagging release images #2

Workflow file for this run

name: build-scan
on:
push:
branches:
- develop
pull_request:
branches:
- "develop"
permissions:
contents: read
packages: write
security-events: write
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
node_types: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: |
echo "matrix=${{vars.NODE_TYPES}}" >> $GITHUB_OUTPUT
build:
needs: matrix
strategy:
matrix:
node: ${{ fromJson(needs.matrix.outputs.node_types) }}
uses: ./.github/workflows/node-build.yml
with:
REGISTRY: ${{ vars.REGISTRY }}
NODE_TYPE: ${{ matrix.node }}
manifest:
needs: [matrix, build]
strategy:
matrix:
node: ${{ fromJson(needs.matrix.outputs.node_types) }}
uses: ./.github/workflows/node-manifest.yml
with:
REGISTRY: ${{ vars.REGISTRY }}
NODE_TYPE: ${{ matrix.node }}
slack-notification:
needs: [matrix, build, manifest]
if: always()
strategy:
matrix:
node: ${{ fromJson(needs.matrix.outputs.node_types) }}
uses: ./.github/workflows/slack-msg.yml
with:
heading: ${{ contains(needs.*.result, 'failure') && 'Image Push Failed :red_circle:' || 'Image Push Success :large_green_circle:' }}
info: "IMAGES: *${{ fromJson(needs.manifest.outputs.json).tags }}*"
url: ${{ github.server_url }}/${{ github.repository }}/pkgs/container/node-${{matrix.node}}
secrets:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
scan-image:
needs: [matrix, build, manifest]
strategy:
matrix:
node: ${{ fromJson(needs.matrix.outputs.node_types) }}
uses: aiblockofficial/workflows/.github/workflows/scan-image.yml@main
secrets: inherit
with:
IMAGE: ${{ fromJson(needs.manifest.outputs.json).tags[0] }}