mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 05:51:44 +03:00
chore: github release split and matrix optimization
This commit is contained in:
1 parent
99f4f830bb
commit
dae5fe60b7
4 files changed
+94
-15
No files matched your search
@@ -54,6 +54,9 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [amd64,arm64]
|
||||||
needs:
|
needs:
|
||||||
- ci
|
- ci
|
||||||
|
|
||||||
@@ -86,7 +89,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/${{ matrix.architecture }}
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
sharevb/it-tools:nightly
|
sharevb/it-tools:nightly
|
||||||
|
|||||||
+5
-13
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image (baseurl-it-tools)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -36,6 +36,9 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [amd64,arm64]
|
||||||
needs:
|
needs:
|
||||||
- ci
|
- ci
|
||||||
steps:
|
steps:
|
||||||
@@ -69,23 +72,12 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
build-args: |
|
build-args: |
|
||||||
"BASE_URL=/it-tools/"
|
"BASE_URL=/it-tools/"
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/${{ matrix.architecture }}
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
sharevb/it-tools:baseurl-it-tools
|
sharevb/it-tools:baseurl-it-tools
|
||||||
ghcr.io/sharevb/it-tools:baseurl-it-tools
|
ghcr.io/sharevb/it-tools:baseurl-it-tools
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
sharevb/it-tools:latest
|
|
||||||
ghcr.io/${{ github.repository_owner }}/it-tools:latest
|
|
||||||
|
|
||||||
# Optionally log out
|
# Optionally log out
|
||||||
- name: Log out from GitHub Container Registry
|
- name: Log out from GitHub Container Registry
|
||||||
run: docker logout ghcr.io
|
run: docker logout ghcr.io
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
name: Build and Push Docker Image (latest)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- chore/all-my-stuffs
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
|
||||||
|
npm install -g corepack@latest
|
||||||
|
echo "After : corepack version => $(corepack --version)"
|
||||||
|
corepack enable
|
||||||
|
pnpm --version
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
run: pnpm lint
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: pnpm test
|
||||||
|
|
||||||
|
- name: Build the app
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [amd64,arm64]
|
||||||
|
needs:
|
||||||
|
- ci
|
||||||
|
steps:
|
||||||
|
# Checkout the repository
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/${{ matrix.architecture }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
sharevb/it-tools:latest
|
||||||
|
ghcr.io/${{ github.repository_owner }}/it-tools:latest
|
||||||
|
|
||||||
|
# Optionally log out
|
||||||
|
- name: Log out from GitHub Container Registry
|
||||||
|
run: docker logout ghcr.io
|
||||||
@@ -8,6 +8,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
docker-release:
|
docker-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: [amd64,arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Get release version
|
- name: Get release version
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
@@ -41,7 +44,7 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
build-args: |
|
build-args: |
|
||||||
"BASE_URL=/it-tools/"
|
"BASE_URL=/it-tools/"
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/${{ matrix.architecture }}
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
sharevb/it-tools:baseurl-it-tools
|
sharevb/it-tools:baseurl-it-tools
|
||||||
|
|||||||
Reference in new issue
Block a user