mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
feat: frontend arm runner (#5351)
* feat: arm64 runner * fix: push image * fix: save sealos * fix: save sealos needs * fix: digests name * fix: secret innherit * fix: checkout * fix: fail-fast * fix: cluster-image-build * fix: save sealos * fix: save sealos * fix: save sealos * fix: save sealos * chore: bump action use deps * chore: bump action use deps * fix: release frontend tag * fix: default latest * feat: delete save sealos
This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Comment cherry-pick command
|
||||
uses: actions/github-script@v5
|
||||
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
cherry-pick:
|
||||
name: Cherry Pick
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='sealos-ci-robot'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Write vars
|
||||
id: set-target
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
fi
|
||||
echo "prNumber=$PR_NUMBER" >> $GITHUB_OUTPUT
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
issues: write
|
||||
discussions: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: usthe/issues-translate-action@v2.7
|
||||
with:
|
||||
|
||||
@@ -7,7 +7,7 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
|
||||
@@ -6,10 +6,10 @@ on:
|
||||
jobs:
|
||||
comment:
|
||||
if: startswith(github.event.comment.body, '/')
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Gh Robot for Sealos
|
||||
uses: labring/robot@v2.0.0
|
||||
with:
|
||||
|
||||
@@ -25,13 +25,13 @@ env:
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
|
||||
@@ -25,16 +25,16 @@ env:
|
||||
|
||||
jobs:
|
||||
format-code:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@ env:
|
||||
|
||||
jobs:
|
||||
check-license:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ on:
|
||||
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
# User-definable name of this GitHub Actions job:
|
||||
name: Scan
|
||||
# If you are self-hosting, change the following `runs-on` value:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
container:
|
||||
# A Docker image with Semgrep installed. Do not change this.
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
# Fetch project source with GitHub Actions Checkout.
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
# Run the "semgrep ci" command on the command line of the docker image.
|
||||
-
|
||||
run: |
|
||||
|
||||
@@ -46,11 +46,11 @@ jobs:
|
||||
|
||||
container-sealos:
|
||||
needs: [ call_ci_workflow ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Expose git commit data
|
||||
uses: rlespinasse/git-commit-data-action@v1
|
||||
- # Add support for more platforms with QEMU (optional)
|
||||
@@ -58,12 +58,12 @@ jobs:
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
@@ -110,12 +110,12 @@ jobs:
|
||||
if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }}
|
||||
needs:
|
||||
- container-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Expose git commit data
|
||||
uses: rlespinasse/git-commit-data-action@v1
|
||||
- name: Renew issue and Sync Images
|
||||
@@ -141,12 +141,12 @@ jobs:
|
||||
needs:
|
||||
- call_ci_workflow
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Download sealos
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -40,12 +40,12 @@ on:
|
||||
|
||||
jobs:
|
||||
resolve-modules:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Resolve Modules
|
||||
id: set-matrix
|
||||
@@ -53,15 +53,15 @@ jobs:
|
||||
|
||||
golangci-lint:
|
||||
needs: [ resolve-modules ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||
|
||||
- name: Run Linter
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.54.2
|
||||
working-directory: ${{ matrix.workdir }}
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
release-frontends:
|
||||
if: ${{ github.event.inputs.build_offline_tar_only == false }}
|
||||
uses: ./.github/workflows/frontend.yml
|
||||
uses: ./.github/workflows/frontends.yml
|
||||
with:
|
||||
push_image: true
|
||||
push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }}
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
OSS_BUCKET: ${{ secrets.OSS_BUCKET }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Download sealos
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
OSS_BUCKET: ${{ secrets.OSS_BUCKET }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Download sealos
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -65,10 +65,10 @@ jobs:
|
||||
if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }}
|
||||
needs:
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Expose git commit data
|
||||
|
||||
@@ -50,12 +50,12 @@ env:
|
||||
LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
|
||||
jobs:
|
||||
resolve-modules:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Resolve Modules
|
||||
id: set-matrix
|
||||
@@ -64,28 +64,28 @@ jobs:
|
||||
golangci-lint:
|
||||
if: ${{ github.event_name }} == 'push' || ${{ github.event_name }} == 'pull_request'
|
||||
needs: [ resolve-modules ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||
- name: Run Linter
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.54.2
|
||||
working-directory: ${{ matrix.workdir }}
|
||||
args: "--out-${NO_FUTURE}format colored-line-number"
|
||||
|
||||
image-build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
module:
|
||||
@@ -103,12 +103,12 @@ jobs:
|
||||
- { name: objectstorage, path: objectstorage }
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -150,12 +150,12 @@ jobs:
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -163,7 +163,7 @@ jobs:
|
||||
password: ${{ secrets.GH_PAT }}
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
|
||||
|
||||
- name: build (and publish) ${{ matrix.module.name }} main image
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./controllers/${{ matrix.module.path }}
|
||||
file: ./controllers/${{ matrix.module.path }}/Dockerfile
|
||||
@@ -190,7 +190,7 @@ jobs:
|
||||
needs:
|
||||
- image-build
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
module:
|
||||
@@ -208,7 +208,7 @@ jobs:
|
||||
- { name: objectstorage, path: objectstorage }
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ on:
|
||||
|
||||
jobs:
|
||||
del_runs:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@v2
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
name: Preview
|
||||
url: ${{ steps.vercel-action.outputs.preview-url }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
# Job outputs
|
||||
outputs:
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -91,9 +91,9 @@ jobs:
|
||||
|
||||
docsOutput:
|
||||
needs: [ build ]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
@@ -26,10 +26,10 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-docs-image:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
password: ${{ secrets.ALI_HUB_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker images to ghcr.io and Aliyun Hub
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./docs
|
||||
file: ./docs/website/Dockerfile
|
||||
@@ -65,11 +65,11 @@ jobs:
|
||||
|
||||
update-docs-image:
|
||||
needs: build-docs-image
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'labring/sealos'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions-hub/kubectl@master
|
||||
env:
|
||||
KUBE_CONFIG: ${{ secrets.SEALOS_TOP_KUBE_CONF }}
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
target_pull: true
|
||||
e2e_apply_test:
|
||||
needs: [ call_ci_workflow ]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
strategy:
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
echo 'test_${{ matrix.arch }}_result=success' >> "$GITHUB_OUTPUT"
|
||||
issue_commit:
|
||||
needs: [ e2e_apply_test ]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
if: ${{ always() && github.event.label.name == 'need-e2e-apply-test' }} #success() || failure()
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
target_pull: true
|
||||
e2e_apply_test:
|
||||
needs: [ call_ci_workflow ]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
strategy:
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
echo 'test_${{ matrix.arch }}_result=success' >> "$GITHUB_OUTPUT"
|
||||
issue_commit:
|
||||
needs: [ e2e_apply_test ]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
issues: write
|
||||
if: ${{ always() && github.event.label.name == 'need-e2e-apply-test' }} #success() || failure()
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
E2E_sealos_runtime_version_docker_127_test,
|
||||
E2E_sealos_runtime_version_docker_128_test
|
||||
]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Download image-cri-shim
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
[
|
||||
E2E_sealos_k3s_basic_test,
|
||||
]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Download image-cri-shim
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
image: false
|
||||
verify-image_cri_shim:
|
||||
needs: [ call_ci_workflow ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||
|
||||
+139
-145
@@ -1,185 +1,179 @@
|
||||
name: Build Frontend Image
|
||||
|
||||
on:
|
||||
create:
|
||||
tags:
|
||||
workflow_call:
|
||||
inputs:
|
||||
module:
|
||||
description: "Module"
|
||||
required: true
|
||||
type: string
|
||||
push_image:
|
||||
description: 'Push image'
|
||||
description: "Push image"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
push_image_tag:
|
||||
description: 'Push image tag'
|
||||
default: 'latest'
|
||||
description: "Push image tag"
|
||||
default: "latest"
|
||||
required: false
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
push_image:
|
||||
description: 'Push image'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
push_image_tag:
|
||||
description: 'Push image tag'
|
||||
default: 'latest'
|
||||
required: false
|
||||
type: string
|
||||
push:
|
||||
branches: ['main']
|
||||
paths:
|
||||
- 'frontend/desktop/**'
|
||||
- 'frontend/providers/**'
|
||||
- '.github/workflows/frontend.yml'
|
||||
- '!**/*.md'
|
||||
- '!**/*.yaml'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'frontend/desktop/**'
|
||||
- 'frontend/providers/**'
|
||||
- '.github/workflows/frontend.yml'
|
||||
- '!**/*.md'
|
||||
- '!**/*.yaml'
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.20'
|
||||
DEFAULT_OWNER: 'labring'
|
||||
GO_VERSION: "1.20"
|
||||
DEFAULT_OWNER: "labring"
|
||||
|
||||
jobs:
|
||||
image-build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
module:
|
||||
[
|
||||
providers/license,
|
||||
providers/cronjob,
|
||||
providers/template,
|
||||
providers/adminer,
|
||||
providers/applaunchpad,
|
||||
providers/terminal,
|
||||
providers/dbprovider,
|
||||
providers/costcenter,
|
||||
providers/objectstorage,
|
||||
providers/kubepanel,
|
||||
providers/workorder,
|
||||
providers/devbox,
|
||||
desktop,
|
||||
]
|
||||
include:
|
||||
- arch: amd64
|
||||
- arch: arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runs-on || 'ubuntu-24.04' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Expose git commit data
|
||||
uses: rlespinasse/git-commit-data-action@v1
|
||||
- name: Check if tag
|
||||
id: check_tag
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
echo "isTag=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "isTag=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}"
|
||||
- name: Extract module name
|
||||
id: module_name
|
||||
run: |
|
||||
MODULE_NAME=$(basename ${{ matrix.module }})
|
||||
MODULE_NAME=$(basename ${{ inputs.module }})
|
||||
echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV
|
||||
echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
${{ env.GHCR_REPO }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Github Container Hub
|
||||
if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
uses: docker/login-action@v2
|
||||
if: ${{ inputs.push_image }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_PAT }}
|
||||
- name: Cache pnpm-store
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: pnpm-store
|
||||
key: pnpm-store-${{ hashFiles('Dockerfile') }}
|
||||
- name: inject pnpm-store into docker
|
||||
uses: reproducible-containers/buildkit-cache-dance@v2.1.2
|
||||
with:
|
||||
cache-source: pnpm-store
|
||||
- name: Build And Push
|
||||
uses: docker/build-push-action@v4
|
||||
|
||||
- name: Build
|
||||
id: build
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./frontend
|
||||
file: ./frontend/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
build-args: |
|
||||
name=${{ env.MODULE_NAME }}
|
||||
path=${{ matrix.module }}
|
||||
# Push if it's a push event or if push_image is true
|
||||
push: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
path=${{ inputs.module }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
save-sealos:
|
||||
uses: ./.github/workflows/import-save-sealos.yml
|
||||
with:
|
||||
artifact_name: sealos-frontend
|
||||
cluster-image-build:
|
||||
if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
needs:
|
||||
- image-build
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
module:
|
||||
[
|
||||
providers/license,
|
||||
providers/cronjob,
|
||||
providers/template,
|
||||
providers/adminer,
|
||||
providers/applaunchpad,
|
||||
providers/terminal,
|
||||
providers/dbprovider,
|
||||
providers/costcenter,
|
||||
providers/objectstorage,
|
||||
providers/kubepanel,
|
||||
providers/workorder,
|
||||
providers/devbox,
|
||||
desktop,
|
||||
]
|
||||
outputs: type=image,"name=${{ env.GHCR_REPO }}",name-canonical=true,push-by-digest=${{ inputs.push_image }},push=${{ inputs.push_image }}
|
||||
- name: Export digest
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digests-${{ env.MODULE_NAME }}-${{ matrix.arch }}
|
||||
path: ${{ runner.temp }}/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
image-release:
|
||||
name: Push Docker Images
|
||||
needs: image-build
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ inputs.push_image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to Github Container Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_PAT }}
|
||||
|
||||
- name: Extract module name
|
||||
id: module_name
|
||||
run: |
|
||||
MODULE_NAME=$(basename ${{ inputs.module }})
|
||||
echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV
|
||||
echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV
|
||||
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/digests
|
||||
pattern: digests-${{ env.MODULE_NAME }}-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Expose git commit data
|
||||
uses: rlespinasse/git-commit-data-action@v1
|
||||
|
||||
- name: Check if tag
|
||||
id: check_tag
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
echo "isTag=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "isTag=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}"
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ env.GHCR_REPO }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
cluster-image-build:
|
||||
needs:
|
||||
- image-release
|
||||
if: ${{ inputs.push_image }}
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Extract module name
|
||||
id: module_name
|
||||
run: |
|
||||
MODULE_NAME=$(basename ${{ matrix.module }})
|
||||
MODULE_NAME=$(basename ${{ inputs.module }})
|
||||
echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Expose git commit data
|
||||
@@ -195,7 +189,7 @@ jobs:
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}")
|
||||
tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}")
|
||||
echo old_docker_repo=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
|
||||
echo old_docker_image=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend:latest >> $GITHUB_OUTPUT
|
||||
echo new_docker_repo=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT
|
||||
@@ -220,7 +214,7 @@ jobs:
|
||||
sudo sealos login -u ${{ github.repository_owner }} -p ${{ secrets.GH_PAT }} --debug ghcr.io
|
||||
|
||||
- name: Build ${{ env.MODULE_NAME }}-frontend cluster image
|
||||
working-directory: frontend/${{ matrix.module }}/deploy
|
||||
working-directory: frontend/${{ inputs.module }}/deploy
|
||||
run: |
|
||||
sudo sed -i "s;${{ steps.prepare.outputs.old_docker_image }};${{ steps.prepare.outputs.new_docker_image }};" manifests/*
|
||||
sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-amd64 --platform linux/amd64 -f Kubefile
|
||||
@@ -244,14 +238,14 @@ jobs:
|
||||
with:
|
||||
version: v0.0.8-rc1
|
||||
env:
|
||||
GH_TOKEN: '${{ secrets.GH_PAT }}'
|
||||
SEALOS_TYPE: 'issue_renew'
|
||||
SEALOS_ISSUE_TITLE: '[DaylyReport] Auto build for sealos'
|
||||
SEALOS_ISSUE_BODYFILE: 'scripts/ISSUE_RENEW.md'
|
||||
SEALOS_ISSUE_LABEL: 'dayly-report'
|
||||
SEALOS_ISSUE_TYPE: 'day'
|
||||
SEALOS_ISSUE_REPO: 'labring-actions/cluster-image'
|
||||
SEALOS_COMMENT_BODY: '/imagesync ${{ steps.prepare.outputs.cluster_image }}'
|
||||
GH_TOKEN: "${{ secrets.GH_PAT }}"
|
||||
SEALOS_TYPE: "issue_renew"
|
||||
SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
|
||||
SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
|
||||
SEALOS_ISSUE_LABEL: "dayly-report"
|
||||
SEALOS_ISSUE_TYPE: "day"
|
||||
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
|
||||
SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.cluster_image }}"
|
||||
|
||||
- name: Renew issue and Sync Images for ${{ steps.prepare.outputs.latest_cluster_image }}
|
||||
uses: labring/gh-rebot@v0.0.6
|
||||
@@ -259,11 +253,11 @@ jobs:
|
||||
with:
|
||||
version: v0.0.8-rc1
|
||||
env:
|
||||
GH_TOKEN: '${{ secrets.GH_PAT }}'
|
||||
SEALOS_TYPE: 'issue_renew'
|
||||
SEALOS_ISSUE_TITLE: '[DaylyReport] Auto build for sealos'
|
||||
SEALOS_ISSUE_BODYFILE: 'scripts/ISSUE_RENEW.md'
|
||||
SEALOS_ISSUE_LABEL: 'dayly-report'
|
||||
SEALOS_ISSUE_TYPE: 'day'
|
||||
SEALOS_ISSUE_REPO: 'labring-actions/cluster-image'
|
||||
SEALOS_COMMENT_BODY: '/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}'
|
||||
GH_TOKEN: "${{ secrets.GH_PAT }}"
|
||||
SEALOS_TYPE: "issue_renew"
|
||||
SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
|
||||
SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
|
||||
SEALOS_ISSUE_LABEL: "dayly-report"
|
||||
SEALOS_ISSUE_TYPE: "day"
|
||||
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
|
||||
SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}"
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
name: Build Frontends Image
|
||||
|
||||
on:
|
||||
create:
|
||||
tags:
|
||||
workflow_call:
|
||||
inputs:
|
||||
push_image:
|
||||
description: "Push image"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
push_image_tag:
|
||||
description: "Push image tag"
|
||||
default: "latest"
|
||||
required: false
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
push_image:
|
||||
description: "Push image"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
push_image_tag:
|
||||
description: "Push image tag"
|
||||
default: "latest"
|
||||
required: false
|
||||
type: string
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "frontend/desktop/**"
|
||||
- "frontend/providers/**"
|
||||
- ".github/workflows/frontend.yml"
|
||||
- "!**/*.md"
|
||||
- "!**/*.yaml"
|
||||
pull_request:
|
||||
branches: ["*"]
|
||||
paths:
|
||||
- "frontend/desktop/**"
|
||||
- "frontend/providers/**"
|
||||
- ".github/workflows/frontend.yml"
|
||||
- "!**/*.md"
|
||||
- "!**/*.yaml"
|
||||
|
||||
jobs:
|
||||
save-sealos:
|
||||
uses: ./.github/workflows/import-save-sealos.yml
|
||||
with:
|
||||
artifact_name: sealos-frontend
|
||||
|
||||
image-build:
|
||||
uses: ./.github/workflows/frontend.yml
|
||||
needs: save-sealos
|
||||
secrets: inherit
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
module:
|
||||
[
|
||||
providers/license,
|
||||
providers/cronjob,
|
||||
providers/template,
|
||||
providers/adminer,
|
||||
providers/applaunchpad,
|
||||
providers/terminal,
|
||||
providers/dbprovider,
|
||||
providers/costcenter,
|
||||
providers/objectstorage,
|
||||
providers/kubepanel,
|
||||
providers/workorder,
|
||||
providers/devbox,
|
||||
desktop,
|
||||
]
|
||||
with:
|
||||
module: ${{ matrix.module }}
|
||||
push_image: ${{ (github.event_name == 'push') || (github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
push_image_tag: ${{ inputs.push_image_tag }}
|
||||
@@ -26,15 +26,15 @@ on:
|
||||
|
||||
jobs:
|
||||
resolve-modules-arch:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ (inputs.target_pull == false) }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout by Pull Request Target
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ (inputs.target_pull == true) }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
@@ -43,15 +43,15 @@ jobs:
|
||||
id: set-matrix
|
||||
run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }} "true"
|
||||
resolve-modules:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ (inputs.target_pull == false) }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout by Pull Request Target
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ (inputs.target_pull == true) }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
@@ -61,23 +61,23 @@ jobs:
|
||||
run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }}
|
||||
build:
|
||||
needs: [ resolve-modules ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ (inputs.target_pull == false) }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Checkout by Pull Request Target
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ (inputs.target_pull == true) }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -98,22 +98,22 @@ jobs:
|
||||
name: ${{ matrix.binary }}-${{ matrix.arch }}
|
||||
path: bin/linux_${{ matrix.arch}}/${{ matrix.binary }}
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ (inputs.e2e == true) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ (inputs.target_pull == false) }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Checkout by Pull Request Target
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ (inputs.target_pull == true) }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Install Dependencies
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
path: test/e2e/e2e.test
|
||||
docker:
|
||||
needs: [ resolve-modules-arch,build ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ (inputs.image == true) }}
|
||||
services:
|
||||
registry:
|
||||
@@ -141,9 +141,9 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ (inputs.target_pull == false) }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout by Pull Request Target
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ (inputs.target_pull == true) }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
path: docker/sealos
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
chmod a+x docker/lvscare/*
|
||||
|
||||
- name: Build and Push lvscare Image
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: docker/lvscare
|
||||
file: docker/lvscare/Dockerfile.main
|
||||
|
||||
@@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
save-sealos:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Install sealos
|
||||
uses: labring/sealos-action@v0.0.7
|
||||
|
||||
@@ -67,10 +67,10 @@ jobs:
|
||||
if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }}
|
||||
needs:
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Expose git commit data
|
||||
|
||||
@@ -14,15 +14,15 @@ on:
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -33,14 +33,14 @@ jobs:
|
||||
qemu-user-static binfmt-support
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_RELEASE_PAT }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
args: release --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl
|
||||
env:
|
||||
@@ -49,12 +49,12 @@ jobs:
|
||||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
||||
|
||||
sync:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- goreleaser
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch Current version
|
||||
@@ -91,12 +91,12 @@ jobs:
|
||||
SEALOS_COMMENT_BODY: "/imagebuild_apps sealos ${{steps.get-current-tag.outputs.tag }}"
|
||||
|
||||
changelog:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- goreleaser
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch Current version
|
||||
|
||||
@@ -50,12 +50,12 @@ env:
|
||||
|
||||
jobs:
|
||||
resolve-modules:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Resolve Modules
|
||||
id: set-matrix
|
||||
@@ -63,39 +63,39 @@ jobs:
|
||||
|
||||
golangci-lint:
|
||||
needs: [ resolve-modules ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Run Linter
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.54.2
|
||||
working-directory: ${{ matrix.workdir }}
|
||||
args: "--out-${NO_FUTURE}format colored-line-number"
|
||||
|
||||
image-build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
## TODO: add more modules
|
||||
module: [ database, pay, account, minio, launchpad, exceptionmonitor, aiproxy, devbox ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -138,12 +138,12 @@ jobs:
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module }}-service
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true
|
||||
|
||||
- name: build (and publish) ${{ matrix.module }} main image
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./service/${{ matrix.module }}
|
||||
file: ./service/${{ matrix.module }}/Dockerfile
|
||||
@@ -180,14 +180,14 @@ jobs:
|
||||
needs:
|
||||
- image-build
|
||||
- save-sealos
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
## TODO: add more modules
|
||||
module: [ database, pay, account, minio, launchpad, exceptionmonitor, aiproxy, devbox ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run GitHub File Sync
|
||||
# Can update to v1 when https://github.com/BetaHuhn/repo-file-sync-action/issues/168 is resolved
|
||||
|
||||
@@ -9,10 +9,10 @@ on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run GitHub File Sync
|
||||
uses: BetaHuhn/repo-file-sync-action@v1.21.0
|
||||
|
||||
@@ -28,12 +28,12 @@ env:
|
||||
|
||||
jobs:
|
||||
resolve-modules:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Resolve Modules
|
||||
id: set-matrix
|
||||
@@ -41,15 +41,15 @@ jobs:
|
||||
|
||||
golangci-lint:
|
||||
needs: [ resolve-modules ]
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -57,25 +57,25 @@ jobs:
|
||||
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||
|
||||
- name: Run Linter
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.54.2
|
||||
working-directory: ${{ matrix.workdir }}
|
||||
args: "--out-${NO_FUTURE}format colored-line-number"
|
||||
|
||||
image-build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
module: [ admission ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Golang with cache
|
||||
uses: magnetikonline/action-golang-cache@v3
|
||||
uses: magnetikonline/action-golang-cache@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
@@ -107,12 +107,12 @@ jobs:
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
||||
Reference in New Issue
Block a user