Skip to content

Commit

Permalink
ci: Adds call of build-docker-from-tag.yml from release-please. (#153)
Browse files Browse the repository at this point in the history
# What ❔
Adds call of build-docker-from-tag.yml from release-please.
Allows manually call of build-docker-from-tag.yml.

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

To create releases due to issue in github which doesn't allow automatic
workflow triggers from workflow.
<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
yorik authored Oct 4, 2023
1 parent 2db8489 commit d6a1399
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
name: Build Image from tag
on:
workflow_call:
inputs:
tag_name:
description: "Tag of an image to built"
type: string
required: true
workflow_dispatch:
inputs:
tag_name:
description: "Tag of an image to built"
type: string
required: true
push:
tags:
- core-v**
Expand All @@ -10,7 +22,7 @@ concurrency: docker-build
jobs:
setup:
name: Setup
runs-on: [k8s, stage]
runs-on: [ubuntu-latest]
outputs:
image_tag_suffix: ${{ steps.set.outputs.image_tag_suffix }}
steps:
Expand All @@ -21,7 +33,12 @@ jobs:
- name: Generate output with git tag
id: set
run: |
git_tag="${GITHUB_REF#refs/*/}"
git_tag=""
if [[ -z "${{ inputs.tag_name }}" ]]; then
git_tag="${GITHUB_REF#refs/*/}"
else
git_tag="${{ inputs.tag_name }}"
fi
version=$(cut -d "-" -f2 <<< ${git_tag})
echo "image_tag_suffix=${version}" >> $GITHUB_OUTPUT
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please
jobs:
release-please:
Expand Down

0 comments on commit d6a1399

Please sign in to comment.