Skip to content

ci: fixes on release.yml and test-build.yml #75

ci: fixes on release.yml and test-build.yml

ci: fixes on release.yml and test-build.yml #75

Workflow file for this run

name: Test Build
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}
jobs:
# run-tests:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# ref: ${{ github.ref }}
# - name: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: 1.21.x
# - name: Run linting tests
# id: update
# run: |
# make prepare
# make lint
# make fmt-check
# make imports-check
# - name: Run unit tests
# run: |
# make coverage-ci
# - name: Build cross-platform binaries
# run: |
# make build-cli-cross-platform
# - name: Run integration tests
# env:
# CI_ACCOUNT: ${{ secrets.CI_ACCOUNT }}
# CI_SUBACCOUNT: ${{ secrets.CI_SUBACCOUNT }}
# CI_API_KEY: ${{ secrets.CI_API_KEY }}
# CI_API_SECRET: ${{ secrets.CI_API_SECRET }}
# LW_INT_TEST_AWS_ACC: ${{ secrets.LW_INT_TEST_AWS_ACC }}
# run: |
# sudo apt-get update
# sudo apt-get install -y vim
# make integration-only
# # TODO Display test report
# - name: Notify Slack on Failure
# uses: slackapi/[email protected]
# if: failure()
# with:
# payload: |
# {
# "attachments": [
# {
# "color": "#E92020",
# "blocks": [
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
# }
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
trigger-release:
# needs: run-tests
# To test
# iif: github.ref_name == 'main'
runs-on: ubuntu-latest
container:
image: techallylw/ally-releases:1.21.0
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Trigger release
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
CI: true
run: |
git config --global --add safe.directory "$PWD"
git config commit.gpgsign true
git config --global tag.gpgSign true
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
scripts/release.sh trigger
# - name: Notify Slack on Failure
# uses: slackapi/[email protected]
# if: failure()
# with:
# payload: |
# {
# "attachments": [
# {
# "color": "#E92020",
# "blocks": [
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\ngo-sdk/test-build\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}"
# }
# }
# ]
# }
# ]
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK