Skip to content

Split workflows for reusability #6

Split workflows for reusability

Split workflows for reusability #6

Workflow file for this run

name: Build / Test / Tag
on:
push:
branches:
- '**'
tags:
- '**'
jobs:
meta:
name: Determine image permatags
uses: ./.github/workflows/meta.yml
build:
name: Build the image
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: ./.github/workflows/build.yml
test:
name: Test built image
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs: build
uses: ./.github/workflows/test.yml
with:
image: ${{ needs.build.outputs.image }}
tag:
name: Tag/push tested image
needs: [build, test, meta]
uses: ./.github/workflows/tag.yml
with:
image: ${{ needs.build.outputs.image || needs.meta.outputs.base-tag }}
tags: ${{ needs.meta.outputs.permatags }}