speed up docker build github actions

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith
2025-06-09 18:00:02 +01:00
parent 5044339c80
commit 108a297b84
2 changed files with 29 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
name: Docker-Builder
on:
push:
branches:
@@ -11,7 +12,9 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
check-token:
name: Check Token
runs-on: ubuntu-latest
outputs:
token_defined: ${{ steps.token_check.outputs.token_defined }}
@@ -22,16 +25,20 @@ jobs:
MY_TOKEN: ${{ secrets.MY_TOKEN }}
if: "${{ env.MY_TOKEN != '' }}"
run: echo "token_defined=true" >> "$GITHUB_OUTPUT"
build:
name: Release
name: Build
runs-on: ubuntu-latest
needs: [check-token]
if: needs.check-token.outputs.token_defined == 'true'
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
fetch-depth: 0
node-version: 'lts/*'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@@ -54,6 +61,22 @@ jobs:
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- name: Install Translate Packages (allowed to fail)
working-directory: ./translate
run: node translate.js || true
- name: Run extractall
working-directory: ./translate
run: node translate.js extractall
- name: Run minifyall
working-directory: ./translate
run: node translate.js minifyall
- name: Run translateall
working-directory: ./translate
run: node translate.js translateall
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
@@ -68,8 +91,8 @@ jobs:
INCLUDE_MONGODB_TOOLS=true
INCLUDE_POSTGRESQL_TOOLS=true
INCLUDE_MARIADB_TOOLS=true
DISABLE_MINIFY=no
DISABLE_TRANSLATE=no
DISABLE_MINIFY=yes
DISABLE_TRANSLATE=yes
PREINSTALL_LIBS=true
#- name: Docker Scout