docs: update environment variable naming from NODE_ENV to BUN_ENV

This commit is contained in:
jango-blockchained
2025-02-04 14:56:22 +01:00
parent 5d0c2f54a2
commit 5f078ff227
2 changed files with 67 additions and 2 deletions

65
.github/workflows/docker-build-push.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Docker Build and Push
on:
push:
branches: [ "main" ]
tags:
- 'v*.*.*' # Triggers on version tags like v1.0.0
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required for version detection
- name: Get version from tag
id: version
uses: actions/github-script@v6
with:
script: |
const tag = process.env.GITHUB_REF?.replace('refs/tags/v', '');
return tag || 'latest';
- name: Set up semantic versioning
id: semver
uses: mathieudutour/github-tag-action@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
tag_prefix: 'v'
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ steps.version.outputs.result }}
type=raw,value=${{ steps.semver.outputs.new_tag }}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}