Skip to content

Fix VAULT_PID_FILE variable #54

Fix VAULT_PID_FILE variable

Fix VAULT_PID_FILE variable #54

Workflow file for this run

name: Matrix Build
on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened]
# schedule:
# # Runs at 15:00, only on Saturday.
# - cron: '0 15 * * SAT'
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.filtered.outputs.matrix }}
steps:
- id: releases
uses: actions-matrix/github-release-matrix-action@v1
with:
repository: "hashicorp/vault"
prefix: true
limit: 10
env:
GH_TOKEN: ${{ github.token }}
- id: filtered
name: Exclude Valut enterprise releases
run: |
cat "$GITHUB_RELEASE_MATRIX_ACTION_RELEASE_FILE" |
jq -r ".[] | select(.tag_name | contains(\"ent\") | not) | ." |
jq -rs ". | tostring" > releases.json
echo "matrix={\"releases\": $(cat "releases.json")}" | tee -a "$GITHUB_OUTPUT"
shell: bash
generate-canonical:
runs-on: ubuntu-latest
needs: generate
outputs:
matrix: ${{ steps.filtered.outputs.matrix }}
steps:
- id: filtered
name: Generate "{{major}}.{{minor}}" releases
run: |
echo '${{ needs.generate.outputs.matrix }}' |
jq ".releases" |
jq ".[] | select(.tag_name | contains(\"ent\") | not) | .tag_name" |
jq "split(\".\") | del(.[-1]) | join(\".\")" |
jq -rs ". | unique | sort | tostring" \
> releases.json
echo "matrix={\"releases\": $(cat "releases.json")}" | tee -a "$GITHUB_OUTPUT"
shell: bash
versioned:
uses: ./.github/workflows/build.yml
needs: generate
strategy:
matrix: ${{fromJson(needs.generate.outputs.matrix)}}
with:
version: ${{ matrix.releases.tag_name }}
secrets: inherit
canonical:
uses: ./.github/workflows/build.yml
needs: generate-canonical
strategy:
matrix: ${{fromJson(needs.generate-canonical.outputs.matrix)}}
with:
version: ${{ matrix.releases }}
tag-pattern: "type=raw"
secrets: inherit