From 20ebdfc990eb078e7164a23efb0e6f443c882867 Mon Sep 17 00:00:00 2001 From: emmdim Date: Tue, 27 Feb 2024 13:02:48 +0100 Subject: [PATCH] Updates GH actions versions and Enables GH actions on pushes on the delpoyment branches --- .github/workflows/main.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 813067a..555fe14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,8 +3,10 @@ name: Main on: push: - paths-ignore: - - '.github/**' + branches: + - 'release/**' + - 'master' + - 'stg' pull_request: paths-ignore: - '.github/**' @@ -14,10 +16,10 @@ jobs: runs-on: self-hosted steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup NodeJS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18.x @@ -41,13 +43,13 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -62,7 +64,7 @@ jobs: echo "DATE_IN_SECS=$(date +%s)" >> $GITHUB_OUTPUT - name: Push to ghcr.io (main, static) - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/master' with: context: . @@ -79,7 +81,7 @@ jobs: ghcr.io/vocdoni/${{ github.event.repository.name }}:${{ steps.vars.outputs.BRANCH_NAME }}-static-${{ steps.vars.outputs.DATE_IN_SECS }} - name: Push to ghcr.io (stg, static) - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/stg' with: context: . @@ -96,7 +98,7 @@ jobs: ghcr.io/vocdoni/${{ github.event.repository.name }}:${{ steps.vars.outputs.BRANCH_NAME }}-static-${{ steps.vars.outputs.DATE_IN_SECS }} - name: Push to ghcr.io (prod, static) - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: startsWith(github.ref, 'refs/heads/release') with: context: .