Skip to content

Build another docker image that uses the .env.staging file instead of .env.production and tag it with "staging" #43

Build another docker image that uses the .env.staging file instead of .env.production and tag it with "staging"

Build another docker image that uses the .env.staging file instead of .env.production and tag it with "staging" #43

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build-push-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/projectlighthousecau/luna
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=long
- name: Build and Push image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
network: host
push: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- id: meta-dev
uses: docker/metadata-action@v5
with:
images: ghcr.io/projectlighthousecau/luna
tags: |
type=raw,value=dev,enable={{is_default_branch}}
type=sha,format=long
- name: Build and Push dev image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
network: host
push: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
build-args: |
"DEPLOYMENT_ENVIRONMENT=dev"