Skip to content

Commit

Permalink
Make input version optional for add_operand action
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanemerson committed Oct 4, 2024
1 parent 49d09b7 commit 3ad21d0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/add_operand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
type: string
version:
description: "The upstream-version of the Operand"
required: true
type: string
ref:
description: "The git reference to checkout"
Expand All @@ -29,7 +28,6 @@ on:
type: string
version:
description: "The upstream-version of the Operand"
required: true
type: string
ref:
description: "The git reference to checkout"
Expand All @@ -42,7 +40,7 @@ on:
type: string

jobs:
release:
add-operand:
runs-on: ubuntu-latest

steps:
Expand All @@ -52,18 +50,28 @@ jobs:
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}

- name: Determine Upstream Version
run: |
if [[ -z "${{ inputs.version }}" ]]; then
IMAGE=${{ inputs.image }}
TAG=${IMAGE#*:}
echo VERSION=${TAG%.Final} >> ${GITHUB_ENV}
else
echo VERSION=${{ inputs.version }} >> ${GITHUB_ENV}
fi
- name: Add Operand
run: ./scripts/ci/add_operand.sh
env:
IMAGE: ${{ inputs.image }}
VERSION: ${{ inputs.version }}
VERSION: ${{ env.VERSION }}

- name: Commit changes and create tag
run: |
git config user.email "[email protected]"
git config user.name "Infinispan"
git add config/manager/manager.yaml documentation/asciidoc/topics/attributes/community-attributes.adoc documentation/asciidoc/topics/supported_operands/
git commit -m "Add Operand ${{ inputs.version }}"
git commit -m "Add Operand ${{ env.VERSION }}"
- name: Push Git changes
uses: ad-m/github-push-action@master
Expand Down

0 comments on commit 3ad21d0

Please sign in to comment.