Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update actions
  • Loading branch information
yogeshojha committed Aug 13, 2024
commit 86112bf5b4369590ed890b89e4b4b037fd8f4c2b
4 changes: 3 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ jobs:
with:
images: yogeshojha/rengine
tags: |
type=raw,value=pr-${{ github.event.pull_request.number }}
type=sha,prefix=sha-
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-

- name: 🏗️ Build Docker image
uses: docker/build-push-action@v5
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: 🚀 Build Docker image
name: 🚀 Build and Push Docker image

on:
push:
branches: [ master ]
release:
types: [published]
schedule:
- cron: '0 0 */5 * *'
- cron: '0 0 */5 * *' # Run every 5 days at midnight UTC

jobs:
build:
build-and-push:
name: 🐳 Build and Push Docker image
runs-on: ubuntu-latest
steps:
Expand All @@ -33,15 +35,18 @@ jobs:
images: yogeshojha/rengine
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix={{branch}}-
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=sha-
type=schedule,pattern={{date 'YYYYMMDD'}}

- name: 🏗️ Build and push Docker image
uses: docker/build-push-action@v5
with:
context: web/
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down