From 15150b23a74a989ff5d634a34d4bac2936f9a34c Mon Sep 17 00:00:00 2001 From: Bastien Chatelard Date: Sat, 16 Dec 2023 10:17:19 +0100 Subject: [PATCH] Rework github actions --- .github/workflows/build-and-deploy.yml | 12 +++++------- .github/workflows/e2e-tests.yml | 2 +- .github/workflows/generate.yml | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index f4b8c47..1d4f255 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -4,15 +4,13 @@ on: push: branches: - main - - develop + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 pull_request: branches: - - develop + - main release: types: [published] - push: - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: build-linux: @@ -52,7 +50,7 @@ jobs: run: | PACK_CMD=./pack make images - name: Publish images - if: (github.event_name == 'repository_dispatch') || (github.event_name == 'push' && github.ref == 'refs/heads/main') + if: ${{ startsWith(github.ref, 'refs/tags/') }} run: | # push heroku 20 and 22 for version in "20" "22"; do @@ -74,7 +72,7 @@ jobs: run: | PACK_CMD=$PWD/pack make test - name: Publish beta buildpack - if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') run: | # publish builder heroku-20 and flag as beta docker tag koyeb/builder:heroku-20 koyeb/builder:beta diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index e0e0cae..cd37478 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -12,7 +12,7 @@ on: jobs: test: - if: github.ref == 'refs/heads/develop' + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 70a0028..365ccf3 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -12,7 +12,7 @@ jobs: - name: Clone uses: actions/checkout@v2 with: - ref: refs/heads/develop + ref: refs/heads/main - name: install yj run: | echo "Installing yj to /usr/local/bin"