github.com/hazelops/ize@v1.1.12-0.20230915191306-97d7c0e48f11/.github/workflows/run.brew-and-apt-install-tests.yml (about)

     1  name: "Tests: Ize install"
     2  defaults:
     3    run:
     4      shell: bash
     5  
     6  env:
     7    AWS_PROFILE: default
     8    AWS_REGION: us-east-1
     9  
    10  on:
    11    workflow_dispatch:
    12  #  schedule:
    13  #    - cron: '0 3 * * */2'
    14  
    15  jobs:
    16    get_release_version:
    17      name: Get Release Version
    18      runs-on: ubuntu-latest
    19      outputs:
    20        release: ${{ steps.ize_release.outputs.release }}
    21      steps:
    22        - name: get ize version
    23          id: ize_release_version
    24          uses: rez0n/actions-github-release@main
    25          env:
    26            token: ${{ secrets.GITHUB_TOKEN }}
    27            repository: "hazelops/ize"
    28            type: "stable"
    29  
    30        - name: Save release version
    31          id: ize_release
    32          run: |
    33            echo "release=${{ steps.ize_release_version.outputs.release }}" >> $GITHUB_OUTPUT
    34            echo ${{ steps.ize_release_version.outputs.release }}
    35  
    36    install_ize_macos:
    37      name: Install On MacOS Latest
    38      runs-on: macos-latest
    39      needs: get_release_version
    40      steps:
    41        - name: Install Ize
    42          run: |
    43            brew tap hazelops/ize
    44            brew install ize
    45  
    46        - name: Run Ize and compare version
    47          id: izeMacTests
    48          run: ize --version | grep ${{needs.get_release_version.outputs.release}}
    49  
    50        - name: Run Slack Failure Notification
    51          if: failure() && steps.izeMacTests.outcome == 'failure'
    52          run: |
    53            curl -X POST --data-urlencode "payload={\"channel\": \"#core-tools\", \"username\": \"webhookbot\", \"text\": \":x: IZE installation in macOS failed - please check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for more info\", \"icon_emoji\": \":ghost:\"}" ${{ secrets.SLACK_WEBHOOK }}
    54  
    55    install_ize_ubuntu:
    56      name: Install On Ubuntu Latest
    57      runs-on: ubuntu-latest
    58      needs: get_release_version
    59      steps:
    60        - name: Install Ize
    61          run: |
    62            echo "deb [trusted=yes] https://apt.fury.io/hazelops/ /" | sudo tee /etc/apt/sources.list.d/fury.list
    63            sudo apt-get update
    64            sudo apt-get install ize
    65  
    66        - name: Run Ize and compare version
    67          id: izeUbuntuTests
    68          run: ize --version | grep ${{needs.get_release_version.outputs.release}}
    69  
    70        - name: Run Slack Failure Notification
    71          if: failure() && steps.izeUbuntuTests.outcome == 'failure'
    72          run: |
    73            curl -X POST --data-urlencode "payload={\"channel\": \"#core-tools\", \"username\": \"webhookbot\", \"text\": \":x: IZE installation in Ubuntu failed - please check $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID for more info\", \"icon_emoji\": \":ghost:\"}" ${{ secrets.SLACK_WEBHOOK }}