Skip to content

[os] linux/arm64 4 Raspberry PI #45

[os] linux/arm64 4 Raspberry PI

[os] linux/arm64 4 Raspberry PI #45

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]
jobs:
setup-buildx:
runs-on: ubuntu-latest
outputs:
buildx-cache-id: ${{ steps.buildx.outputs.cache-id }}
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
backend-build:
needs: setup-buildx
runs-on: ubuntu-latest
steps:
- name: Checkout backend code
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push the Docker image for backend
uses: docker/build-push-action@v2
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: themanwholikestocode/archive-me-prod:backend-${{ github.event_name == 'pull_request' && 'development' || 'production' }}
platforms: linux/arm64
frontend-build:
needs: setup-buildx
runs-on: ubuntu-latest
steps:
- name: Checkout frontend code
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push the Docker image for frontend
uses: docker/build-push-action@v2
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: themanwholikestocode/archive-me-prod:frontend-${{ github.event_name == 'pull_request' && 'development' || 'production' }}
platforms: linux/arm64