github.com/kubeshop/testkube@v1.17.23/.github/workflows/manual-bump-formula.yaml (about)

     1  name: Manual trigger for Homebrew Formula Bump
     2  
     3  on:
     4    workflow_dispatch:
     5      inputs:
     6        tag-name:
     7          description: 'The git tag to bump the formula to'
     8          required: false
     9    schedule:
    10      - cron: "30 1 1,15 * *" #Run workflow at 01:30 on day-of-month 1 and 15.
    11  
    12  jobs:
    13    homebrew:
    14      name: Bump Homebrew formula
    15      runs-on: ubuntu-latest
    16      steps:
    17        #If the tag was not provided during workflow run, then the latest will be used
    18        - name: Get latest release tag
    19          if: ${{ github.event.inputs.tag-name == '' }}
    20          id: tag
    21          run: |
    22            #Get latest release tag
    23            curl -s -f --output /dev/null --connect-timeout 5 https://api.github.com/repos/kubeshop/testkube/releases/latest
    24  
    25            export VERSION=$(curl -s -f https://api.github.com/repos/kubeshop/testkube/releases/latest | jq -r .tag_name | cut -c2-)
    26            echo "::set-output name=VERSION::${VERSION}"
    27  
    28        - name: Setup Homebrew
    29          uses: Homebrew/actions/setup-homebrew@master
    30  
    31        - name: Update brew
    32          run: brew update
    33        # Run if no tag was provided as an input, latest will be used.
    34        - name: Update Homebrew formula
    35          if: ${{ github.event.inputs.tag-name == '' }}
    36          uses: dawidd6/action-homebrew-bump-formula@v3
    37          with:
    38            token: ${{ secrets.CI_BOT_TOKEN }}
    39            formula: Testkube
    40            tag: ${{ steps.tag.outputs.VERSION }}
    41            force: true
    42        # Run if a tag was provided as an input.
    43        - name: Update Homebrew formula
    44          if: ${{ github.event.inputs.tag-name != '' }}
    45          uses: dawidd6/action-homebrew-bump-formula@v3
    46          with:
    47            token: ${{ secrets.CI_BOT_TOKEN }}
    48            formula: Testkube
    49            tag: ${{ github.event.inputs.tag-name }}
    50            force: true