Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tardieu committed Feb 6, 2024
1 parent c4e8956 commit 9b1c2a8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches:
- 'main'
- 'release-*'

jobs:
CI:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set latest tag and Branch name
run: |
BRANCH=${{ github.event.pull_request.head.ref }}
echo "GIT_BRANCH=$(echo "$BRANCH" | sed 's/[^A-Za-z0-9._-]/-/g' )" >> $GITHUB_ENV
echo "TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Run pre-commit checks
uses: pre-commit/[email protected]

- name: Build
run: make build

- name: Build Image
run: |
make run-e2e-existing-images -e GIT_BRANCH=${{ env.GIT_BRANCH }} TAG=${{ env.GIT_BRANCH }}-${{ env.TAG }}

0 comments on commit 9b1c2a8

Please sign in to comment.