Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgrindel/gha_select_value
GitHub Action to select the first non-empty value.
https://github.com/cgrindel/gha_select_value
Last synced: 2 days ago
JSON representation
GitHub Action to select the first non-empty value.
- Host: GitHub
- URL: https://github.com/cgrindel/gha_select_value
- Owner: cgrindel
- License: apache-2.0
- Created: 2022-01-09T22:33:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T18:04:27.000Z (2 months ago)
- Last Synced: 2024-11-09T20:46:17.608Z (about 2 months ago)
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Select First Non-Empty Value GiHub Action
GitHub Action to select the first non-empty value. This is paritcularly useful when selecting input
values from different input locations.## Quickstart
```yml
name: Move Major Version Tag on Releaseon:
release:
types: [ published ]
workflow_dispatch:
inputs:
release_tag:
required: true
type: stringjobs:
move_major_version_tag:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# Fetch all history for all branches and tags
fetch-depth: 0
- uses: cgrindel/gha_configure_git_user@v1
- name: Resolve release_tag
id: resolve_release_tag
uses: ./
with:
value0: ${{ github.event.release.tag_name }}
value1: ${{ github.event.inputs.release_tag }}
- uses: cgrindel/gha_move_major_version_tag@v1
with:
release_tag: ${{ steps.resolve_release_tag.outputs.resolved_value }}```