Tests: Ize install #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Tests: Ize install" | |
defaults: | |
run: | |
shell: bash | |
env: | |
AWS_PROFILE: default | |
AWS_REGION: us-east-1 | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 3 * * */2' | |
jobs: | |
get_release_version: | |
name: Get Release Version | |
runs-on: ubuntu-latest | |
outputs: | |
release: ${{ steps.ize_release.outputs.release }} | |
steps: | |
- name: get ize version | |
id: ize_release_version | |
uses: rez0n/actions-github-release@main | |
env: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: "hazelops/ize" | |
type: "stable" | |
- name: Save release version | |
id: ize_release | |
run: | | |
echo "release=${{ steps.ize_release_version.outputs.release }}" >> $GITHUB_OUTPUT | |
echo ${{ steps.ize_release_version.outputs.release }} | |
install_ize_macos: | |
name: Install On MacOS Latest | |
runs-on: macos-latest | |
needs: get_release_version | |
steps: | |
- name: Install Ize | |
run: | | |
brew tap hazelops/ize | |
brew install ize | |
- name: Run Ize and compare version | |
id: izeMacTests | |
run: ize --version | grep ${{needs.get_release_version.outputs.release}} | |
- name: Run Slack Failure Notification | |
if: failure() && steps.izeMacTests.outcome == 'failure' | |
run: | | |
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 }} | |
install_ize_ubuntu: | |
name: Install On Ubuntu Latest | |
runs-on: ubuntu-latest | |
needs: get_release_version | |
steps: | |
- name: Install Ize | |
run: | | |
echo "deb [trusted=yes] https://apt.fury.io/hazelops/ /" | sudo tee /etc/apt/sources.list.d/fury.list | |
sudo apt-get update | |
sudo apt-get install ize | |
- name: Run Ize and compare version | |
id: izeUbuntuTests | |
run: ize --version | grep ${{needs.get_release_version.outputs.release}} | |
- name: Run Slack Failure Notification | |
if: failure() && steps.izeUbuntuTests.outcome == 'failure' | |
run: | | |
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 }} |