chore: remove unnecessary env values #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Build | |
on: | |
push: | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
production: | |
name: "Production" | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
- name: "Login to GitHub Container Registry" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set tags | |
id: set-tags | |
run: | | |
TAGS="${{ steps.meta.outputs.tags }}" | |
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then | |
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest" | |
fi | |
echo "tags=$TAGS" >> $GITHUB_ENV | |
- name: Debug build context | |
run: | | |
echo "Checking list of files:" | |
ls -a | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/arm64 | |
tags: ${{ env.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Debug on failure | |
if: ${{ failure() }} | |
run: | | |
echo "Build failed. Checking for intermediate files..." | |
docker buildx ls | |
docker images -a | |
development: | |
name: "Development" | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
flavor: | | |
suffix=-dev. | |
- name: "Login to GitHub Container Registry" | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set tags | |
id: set-tags | |
run: | | |
TAGS="${{ steps.meta.outputs.tags }}" | |
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then | |
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest" | |
fi | |
echo "tags=$TAGS" >> $GITHUB_ENV | |
- name: Debug build context | |
run: | | |
echo "Checking list of files:" | |
ls -a | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile.dev | |
push: ${{ github.event_name != 'pull_request' }} | |
platforms: linux/arm64 | |
tags: ${{ env.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
BUILDKIT_PROGRESS=plain | |
- name: Debug on failure | |
if: ${{ failure() }} | |
run: | | |
echo "Build failed. Checking for intermediate files..." | |
docker buildx ls | |
docker images -a |