diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94af18a823..a9305fabbf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - Dirty: + Earthly: runs-on: "ubuntu-latest" steps: - uses: 'actions/checkout@v4' @@ -39,47 +39,24 @@ jobs: --allow-privileged --secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY ${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }} - +pre-commit - env: - SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} - - name: Get changed files - id: changed-files - shell: bash - run: | - hasChanged=$(git status --porcelain) - if (( $(echo ${#hasChanged}) != 0 )); then - git status - echo "There are changes in the repository" - exit 1 - fi - - Tests: - runs-on: "ubuntu-latest" - needs: - - Dirty - steps: - - uses: 'actions/checkout@v4' - with: - fetch-depth: 0 - - name: Setup Env - uses: ./.github/actions/env - with: - token: ${{ secrets.NUMARY_GITHUB_TOKEN }} - - run: > - earthly - --no-output - --allow-privileged - --secret SPEAKEASY_API_KEY=$SPEAKEASY_API_KEY - ${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }} - +tests + github.com/formancehq/earthly+run-ci --project=ledger --commit=$COMMIT env: SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} + COMMIT: ${{ github.sha }} +# - name: Get changed files +# id: changed-files +# shell: bash +# run: | +# hasChanged=$(git status --porcelain) +# if (( $(echo ${#hasChanged}) != 0 )); then +# git status +# echo "There are changes in the repository" +# exit 1 +# fi GoReleaser: runs-on: "ubuntu-latest" if: contains(github.event.pull_request.labels.*.name, 'build-images') || github.ref == 'refs/heads/main' || github.event_name == 'merge_group' - needs: - - Dirty steps: - uses: earthly/actions-setup@v1 with: @@ -120,7 +97,7 @@ jobs: environment: staging needs: - GoReleaser - - Tests + - Earthly steps: - uses: earthly/actions-setup@v1 with: