-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90619ce
commit b27d481
Showing
2 changed files
with
17 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
name: Build & Publish container images to GHCR | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Integration Tests"] | ||
types: | ||
- completed | ||
push: | ||
branches: | ||
- main | ||
- 'feature/*' | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish: | ||
|
@@ -25,33 +30,20 @@ jobs: | |
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Download workflow info | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
workflow: Integration Tests | ||
run_id: ${{ github.event.workflow_run.id }} | ||
name: workflow-info | ||
|
||
- name: Read workflow information | ||
id: read_info | ||
run: | | ||
echo "git_ref=$(cat git_ref)" >> $GITHUB_OUTPUT | ||
echo "is_tag=$(cat is_tag)" >> $GITHUB_OUTPUT | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
env: | ||
DESCRIPTION: kode-operator is a Kubernetes operator that manages the lifecycle of your development environments. | ||
DESCRIPTION: kode-operator is a Kubernetes operator that manages the lifecycle your development environments. | ||
with: | ||
images: ghcr.io/jacero-io/kode-operator | ||
tags: | | ||
type=raw,value=latest,enable=${{ steps.read_info.outputs.git_ref == 'main' }} | ||
type=raw,value=${{ steps.read_info.outputs.git_ref }},enable=${{ steps.read_info.outputs.is_tag == 'true' }} | ||
type=semver,pattern=v{{version}},value=${{ steps.read_info.outputs.git_ref }},enable=${{ steps.read_info.outputs.is_tag == 'true' }} | ||
type=semver,pattern=v{{major}}.{{minor}},value=${{ steps.read_info.outputs.git_ref }},enable=${{ steps.read_info.outputs.is_tag == 'true' }} | ||
type=semver,pattern=v{{major}},value=${{ steps.read_info.outputs.git_ref }},enable=${{ steps.read_info.outputs.is_tag == 'true' }} | ||
type=sha,prefix=sha- | ||
type=semver,pattern=v{{version}},event=tag | ||
type=semver,pattern=v{{major}}.{{minor}},event=tag | ||
type=semver,pattern=v{{major}},event=tag | ||
type=ref,event=pr | ||
type=sha | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=raw,value=dev-latest | ||
labels: | | ||
[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters