Generate license report of dependencies. #27
Workflow file for this run
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
name: Generate license report of dependencies. | |
on: | |
workflow_dispatch: | |
jobs: | |
confirm-action-execution: | |
runs-on: ubuntu-latest | |
outputs: | |
is_release_allowed: ${{ steps.is_release_allowed_check.outputs.is_release_allowed }} | |
environment: | |
name: automated-release | |
steps: | |
- name: Confirm action execution | |
id: is_release_allowed_check | |
run: | | |
echo "Value of automatic release is ${{ vars.ALLOW_AUTOMATED_RELEASE }}" | |
if (( $(date +%V) % 2 == 1 )); then | |
echo "is_release_allowed=true" >> $GITHUB_ENV | |
else | |
echo "is_release_allowed=false" >> $GITHUB_ENV | |
fi | |
shell: bash | |
release: | |
runs-on: ubuntu-latest | |
needs: [confirm-action-execution] | |
environment: | |
name: automated-release | |
if: ${{ vars.ALLOW_AUTOMATED_RELEASE }} == 'true' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get current release version and calculate next patch version | |
id: next_version | |
run: | | |
git fetch --tags | |
CURRENT_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) | |
NEXT_VERSION=$(echo $CURRENT_VERSION | awk -F. '{ printf "%d.%d.0", $1, $2+1 }') | |
echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT | |
# - name: Trigger release workflow | |
# uses: ./release.yaml | |
# with: | |
# version: ${{ steps.next_version.outputs.version }} | |
- name: Show the values of version | |
run: | | |
echo | |
echo ${{ steps.next_version.outputs.version }} | |
echo ${{ needs.confirm-action-execution.outputs.is_release_allowed }} |