Skip to content

use unpic with ipx

use unpic with ipx #45

Workflow file for this run

name: 🚀 Deploy
on:
workflow_dispatch:
push:
paths:
- backend/**
branches:
- develop
- main
tags:
- "*"
permissions:
actions: write
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: 🐳 Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
access_token: ${{ github.token }}
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: ⚡️ Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: 🔑 Github Registry Auth
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 👀 Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: 🐳 Build
uses: docker/build-push-action@v3
with:
context: backend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
COMMIT=${{ github.sha }}
BRANCH=${{ github.head_ref || github.ref_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- name: 🚚 Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache