Skip to content

GitHub: Development. #1

GitHub: Development.

GitHub: Development. #1

Workflow file for this run

name: Releases
on:
push:
branches:
- liljx
jobs:
get-releases:
name: Get releases
runs-on: ubuntu-latest
strategy:
matrix:
provider: [azure, capa]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get releases
id: get-releases
env:
provider: ${{ matrix.provider }}
run: |
# Get releases.
releases="$(dirname ${provider}/v*/release.yaml)"
# Convert releases into JSON.
releases="$(echo "${releases}" | jq --raw-input --slurp 'split("\n")[:-1]' --compact-output)"
# Store releases.
echo releases="${releases}" >> "${GITHUB_OUTPUT}"
- name: Print releases
run: echo "${{ steps.get-releases.outputs.releases }}"
outputs:
releases: ${{ steps.get-releases.outputs.releases }}
create-release:
name: Create release
runs-on: ubuntu-latest
needs: get-releases
strategy:
matrix:
release: ${{ fromJSON(needs.get-releases.outputs.releases) }}
steps:
- name: Print release
env:
release: ${{ matrix.release }}
run: echo "${release}"
- name: Split release
id: split-release
env:
release: ${{ matrix.release }}
run: |
# Get provider.
provider="${release:h1}"
# Switch release.
case "${provider}" in
capa)
provider="aws"
;;
esac
# Get version.
version="${release:t1}"
# Store provider & version.
echo provider="${provider}" >> "${GITHUB_OUTPUT}"
echo version="${version}" >> "${GITHUB_OUTPUT}"
- name: Print provider & version
env:
provider: ${{ steps.split-release.outputs.provider }}
version: ${{ steps.split-release.outputs.version }}
run: echo "Provider: ${provider} | Version: ${version}"

Check failure on line 78 in .github/workflows/releases.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/releases.yaml

Invalid workflow file

You have an error in your yaml syntax on line 78