Skip to content

iteyelmp is push code to main πŸš€ #21

iteyelmp is push code to main πŸš€

iteyelmp is push code to main πŸš€ #21

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: GitHub Actions ES
run-name: ${{ github.actor }} is push code to main πŸš€
on:
push:
branches: [ "main", "ci-merge" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -v ./cmd/...
- name: Test
run: go test -v ./... -tags ci
- name: Check build and test results
run: |
if [ ${{ job.status }} == 'failure' ]; then
echo "Tests failed. Blocking merge."
exit 1
else
echo "Tests passed. Allowing merge."
exit 0
fi