Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Updates GH actions versions and Enables GH actions on pushes on the …
Browse files Browse the repository at this point in the history
…delpoyment branches
  • Loading branch information
emmdim committed Feb 27, 2024
1 parent bf47cbf commit 20ebdfc
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Main

on:
push:
paths-ignore:
- '.github/**'
branches:
- 'release/**'
- 'master'
- 'stg'
pull_request:
paths-ignore:
- '.github/**'
Expand All @@ -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

Expand All @@ -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 }}
Expand All @@ -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: .
Expand All @@ -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: .
Expand All @@ -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: .
Expand Down

0 comments on commit 20ebdfc

Please sign in to comment.