diff --git a/.github/workflows/tag-repo-publish-image.yml b/.github/workflows/tag-repo-publish-image.yml new file mode 100644 index 0000000..1ed45b3 --- /dev/null +++ b/.github/workflows/tag-repo-publish-image.yml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Intel Corporation +# Copyright 2025 Canonical Ltd. +name: Release Pipeline + +on: + workflow_call: + +permissions: + contents: read + +jobs: + # Outputs: + # changed: 'true' if a new tag was created, 'false' otherwise + # version: a semver string, contents of the VERSION file + tag-github: + uses: onosproject/.github/.github/workflows/tag-github.yml@main + secrets: inherit + + release-image: + needs: tag-github + if: needs.tag-github.outputs.changed == 'true' + permissions: + contents: read + packages: write + actions: read + id-token: write + attestations: write + uses: onosproject/.github/.github/workflows/release-image.yml@main + with: + # Prefix the version with 'v' to follow tagging conventions + docker_tag: v${{ needs.tag-github.outputs.version }} + secrets: inherit + + update-version: + needs: [tag-github, release-image] + if: needs.release-image.result == 'success' + uses: onosproject/.github/.github/workflows/bump-version.yml@main + secrets: inherit + with: + # Prefix the version with 'v' to follow tagging conventions + version: v${{ needs.tag-github.outputs.version }}