Add node-python-docker image and spread weekly build schedule
node-python-docker image / build (arm64) (push) Successful in 1m27s
node-python image / build (amd64) (push) Successful in 2m5s
node-python image / build (arm64) (push) Successful in 1m1s
node-python image / amend-manifest (push) Successful in 12s
node-python-docker image / build (amd64) (push) Successful in 3m56s
node-python-docker image / amend-manifest (push) Successful in 16s
node-python-docker image / build (arm64) (push) Successful in 1m27s
node-python image / build (amd64) (push) Successful in 2m5s
node-python image / build (arm64) (push) Successful in 1m1s
node-python image / amend-manifest (push) Successful in 12s
node-python-docker image / build (amd64) (push) Successful in 3m56s
node-python-docker image / amend-manifest (push) Successful in 16s
- New node-python-docker image (node + python3 venv + docker CLI + git) for CI jobs that need all three - Spread weekly build cron 2h apart (UTC Sunday): docker-node 00:00, node-python 02:00, node-go 04:00, node-python-docker 06:00 - Drop python3-distutils from node-python (removed in Debian trixie / Python 3.13, would break the weekly build)
This commit is contained in:
1 parent
64ba252e49
commit
89b4c47410
6 files changed
+112
-3
No files matched your search
@@ -5,7 +5,7 @@ on:
|
||||
paths:
|
||||
- node-go/**
|
||||
schedule:
|
||||
- cron: '0 2 * * 0' # 02:00 sáng Chủ nhật (UTC)
|
||||
- cron: '0 4 * * 0' # 04:00 sáng Chủ nhật (UTC)
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
name: node-python-docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- node-python-docker/**
|
||||
schedule:
|
||||
- cron: '0 6 * * 0' # 06:00 sáng Chủ nhật (UTC)
|
||||
workflow_dispatch: # Cho phép chạy tay nếu cần
|
||||
|
||||
env:
|
||||
IMAGE_BASE: git.thuanle.me/public/base
|
||||
IMAGE: node-python-docker
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- arm64
|
||||
- amd64
|
||||
runs-on: ${{ matrix.arch }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.thuanle.me
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build Docker images
|
||||
run: |
|
||||
echo "Building image ${{ env.IMAGE }} for architecture: ${{ matrix.arch }}"
|
||||
|
||||
docker build \
|
||||
-f ${{ env.IMAGE }}/Dockerfile \
|
||||
-t ${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-${{ matrix.arch }}-latest \
|
||||
--label "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
|
||||
--label "commit_sha=${{ github.sha }}" \
|
||||
${{ env.IMAGE }}
|
||||
|
||||
docker push ${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-${{ matrix.arch }}-latest
|
||||
|
||||
amend-manifest:
|
||||
runs-on: linux
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.thuanle.me
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Push Docker manifest
|
||||
run: |
|
||||
echo "Delete existing manifest"
|
||||
docker manifest rm ${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-latest || true
|
||||
|
||||
echo "Create new manifest"
|
||||
docker manifest create ${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-latest \
|
||||
${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-amd64-latest \
|
||||
${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-arm64-latest
|
||||
|
||||
docker manifest push ${{ env.IMAGE_BASE }}:${{ env.IMAGE }}-latest
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
paths:
|
||||
- node-python/**
|
||||
schedule:
|
||||
- cron: '0 1 * * 0' # 01:00 sáng Chủ nhật (UTC)
|
||||
- cron: '0 2 * * 0' # 02:00 sáng Chủ nhật (UTC)
|
||||
workflow_dispatch: # Cho phép chạy tay nếu cần
|
||||
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user