Skip to content

Refactor LastUpdatedFooter to correctly calculate duration for human-… #45

Refactor LastUpdatedFooter to correctly calculate duration for human-…

Refactor LastUpdatedFooter to correctly calculate duration for human-… #45

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: amd64
- platform: arm64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Application Version
id: get_version
run: |
version=$(cat package.json | jq -r '.version')
echo "version=$version" >> $GITHUB_OUTPUT
- name: 'Create env production file'
run: |
touch .env.production
echo NEXT_PUBLIC_API_IP=${{ secrets.API_IP }} >> .env.production
echo NEXT_PUBLIC_MAP_IP=${{ secrets.MAP_IP }} >> .env.production
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/${{ matrix.platform }}
push: false
tags: |
vision-frontend:${{ steps.get_version.outputs.version }}
vision-frontend:latest
outputs: type=docker,dest=vision-front-${{ matrix.platform }}.tar
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
NEXT_PUBLIC_API_IP=${{ secrets.API_IP }}
NEXT_PUBLIC_MAP_IP=${{ secrets.MAP_IP }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: vision-front-${{ matrix.platform }}.tar
tag: ${{ steps.get_version.outputs.version }}-${{ github.ref_name }}
overwrite: true