Skip to content

Merge pull request #5 from flipt-io/gm/upgrade-flipt-v1.44 #33

Merge pull request #5 from flipt-io/gm/upgrade-flipt-v1.44

Merge pull request #5 from flipt-io/gm/upgrade-flipt-v1.44 #33

Workflow file for this run

name: Release module
on:
push:
tags: ['*/*'] # semver format
permissions:
contents: read # needed for checkout
packages: write # needed for GHCR access
jobs:
parseTag:
runs-on: ubuntu-latest
outputs:
module: ${{ steps.module.outputs.module }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- id: module
run: |
MODULE=$(echo "${{ github.ref_name }}" | sed '/[a-zA-Z\-]\+\/[v]\?[0-9.]\+/!{q100}; {s#/[v]\?[0-9.]\+##}' || (echo "unexpected tag version" && exit 1))
echo "module=$MODULE" >> "$GITHUB_OUTPUT"
- id: version
run: |
VERSION=$(echo "${{ github.ref_name }}" | sed '/[a-zA-Z\-]\+\/[v]\?[0-9.]\+/!{q100}; {s#[a-zA-Z\-]\+\/[v]\?##}' || (echo "unexpected tag version" && exit 1))
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
release:
if: "${{ contains(fromJson('[\"flipt\", \"traefik\", \"infisical-secrets-operator\", \"otel-operator\"]'), needs.parseTag.outputs.module) }}"
needs: parseTag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Timoni
uses: stefanprodan/timoni/actions/setup@main
- name: Vet module
run: |
timoni mod vet ./${{ needs.parseTag.outputs.module }}
- name: Push module
run: |
timoni mod push ./${{ needs.parseTag.outputs.module }} \
oci://ghcr.io/${{ github.repository_owner }}/timoni-${{ needs.parseTag.outputs.module }} \
--version ${{ needs.parseTag.outputs.version }} \
--creds ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}