diff --git a/.github/workflows/bot-auto-cherry-pick.yml b/.github/workflows/bot-auto-cherry-pick.yml index 608d523a013..ecba3750ffc 100644 --- a/.github/workflows/bot-auto-cherry-pick.yml +++ b/.github/workflows/bot-auto-cherry-pick.yml @@ -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 diff --git a/.github/workflows/bot-cherry-pick.yml b/.github/workflows/bot-cherry-pick.yml index 183ee3e251d..670d4f2f836 100644 --- a/.github/workflows/bot-cherry-pick.yml +++ b/.github/workflows/bot-cherry-pick.yml @@ -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 diff --git a/.github/workflows/bot-issues-translator.yml b/.github/workflows/bot-issues-translator.yml index bc29458d81e..823fc578d23 100644 --- a/.github/workflows/bot-issues-translator.yml +++ b/.github/workflows/bot-issues-translator.yml @@ -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: diff --git a/.github/workflows/bot-labels.yml b/.github/workflows/bot-labels.yml index ff15f94f4cb..54d46ed9e2e 100644 --- a/.github/workflows/bot-labels.yml +++ b/.github/workflows/bot-labels.yml @@ -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: diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml index cee8bc2dbe1..7cd1a037c89 100644 --- a/.github/workflows/bot.yml +++ b/.github/workflows/bot.yml @@ -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: diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index fa92da48b7b..23ba7c346f6 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -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 }} diff --git a/.github/workflows/check-format-code.yml b/.github/workflows/check-format-code.yml index 6215a7e4d02..9de0b54c75c 100755 --- a/.github/workflows/check-format-code.yml +++ b/.github/workflows/check-format-code.yml @@ -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 }} diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index 378bf78269c..fa3a5ffc3f4 100755 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -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 }} diff --git a/.github/workflows/check-link-error.yml b/.github/workflows/check-link-error.yml index c65dd13bd7e..87887a08df9 100644 --- a/.github/workflows/check-link-error.yml +++ b/.github/workflows/check-link-error.yml @@ -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 }} diff --git a/.github/workflows/check-semgrep.yml b/.github/workflows/check-semgrep.yml index c0a2ab55e22..405e5012e62 100644 --- a/.github/workflows/check-semgrep.yml +++ b/.github/workflows/check-semgrep.yml @@ -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: | diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml index 87ec6e05f6a..f1390f0f426 100755 --- a/.github/workflows/ci-patch-image.yml +++ b/.github/workflows/ci-patch-image.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11601ebee4d..89a3ddf7864 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index c7ab2032aee..221bf62ead7 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -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: diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml index f244f05a69c..4fa19378af0 100644 --- a/.github/workflows/cloud.yml +++ b/.github/workflows/cloud.yml @@ -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 diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml index 69ee063c0e6..cf159750183 100644 --- a/.github/workflows/controllers.yml +++ b/.github/workflows/controllers.yml @@ -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 diff --git a/.github/workflows/delete_workflow.yml b/.github/workflows/delete_workflow.yml index 263c2f41aa0..38cab465e51 100644 --- a/.github/workflows/delete_workflow.yml +++ b/.github/workflows/delete_workflow.yml @@ -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 diff --git a/.github/workflows/deploy-docs-preview.yml b/.github/workflows/deploy-docs-preview.yml index d53f2b149dd..a8465634290 100644 --- a/.github/workflows/deploy-docs-preview.yml +++ b/.github/workflows/deploy-docs-preview.yml @@ -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 }} diff --git a/.github/workflows/deploy-docs-site.yml b/.github/workflows/deploy-docs-site.yml index a2d1cdef61c..342e85c59ff 100644 --- a/.github/workflows/deploy-docs-site.yml +++ b/.github/workflows/deploy-docs-site.yml @@ -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 diff --git a/.github/workflows/docs-site-image.yml b/.github/workflows/docs-site-image.yml index 8e3bc0199d0..6cb4ef2fb87 100644 --- a/.github/workflows/docs-site-image.yml +++ b/.github/workflows/docs-site-image.yml @@ -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 }} diff --git a/.github/workflows/e2e_k3s_multi_node.yml b/.github/workflows/e2e_k3s_multi_node.yml index da74ac52a9a..cd7910edded 100644 --- a/.github/workflows/e2e_k3s_multi_node.yml +++ b/.github/workflows/e2e_k3s_multi_node.yml @@ -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() diff --git a/.github/workflows/e2e_k8s_multi_node.yml b/.github/workflows/e2e_k8s_multi_node.yml index 22bdf1478de..8940d9d8582 100644 --- a/.github/workflows/e2e_k8s_multi_node.yml +++ b/.github/workflows/e2e_k8s_multi_node.yml @@ -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() diff --git a/.github/workflows/e2e_test_core.yml b/.github/workflows/e2e_test_core.yml index d65f056e827..446c5d5f377 100644 --- a/.github/workflows/e2e_test_core.yml +++ b/.github/workflows/e2e_test_core.yml @@ -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 diff --git a/.github/workflows/e2e_test_core_k3s.yml b/.github/workflows/e2e_test_core_k3s.yml index 2ef9908dd62..50769a8522d 100644 --- a/.github/workflows/e2e_test_core_k3s.yml +++ b/.github/workflows/e2e_test_core_k3s.yml @@ -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 diff --git a/.github/workflows/e2e_test_image_cri_shim.yml b/.github/workflows/e2e_test_image_cri_shim.yml index 89c79c698a4..64cf947c883 100644 --- a/.github/workflows/e2e_test_image_cri_shim.yml +++ b/.github/workflows/e2e_test_image_cri_shim.yml @@ -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 diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index a807f20db17..3a554d7be32 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -1,83 +1,131 @@ name: Build Frontend 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 + module: + description: "Module" + required: true type: string - workflow_dispatch: - inputs: 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 - 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@v4 + with: + fetch-depth: 0 + + - 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: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.GHCR_REPO }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Github Container Hub + if: ${{ inputs.push_image }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + + - name: Build + id: build + uses: docker/build-push-action@v6 + with: + context: ./frontend + file: ./frontend/Dockerfile + platforms: linux/${{ matrix.arch }} + build-args: | + name=${{ env.MODULE_NAME }} + path=${{ inputs.module }} + labels: ${{ steps.meta.outputs.labels }} + 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: | @@ -86,100 +134,46 @@ jobs: 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 }}) - echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV + 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@v4 + uses: docker/metadata-action@v5 with: images: | - ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend + ${{ 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: Set up QEMU - uses: docker/setup-qemu-action@v2 + - 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: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }} - - name: Login to Github Container Hub - if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} - uses: docker/login-action@v2 - 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 - with: - context: ./frontend - file: ./frontend/Dockerfile - platforms: linux/amd64,linux/arm64 - 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 }} - 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, - ] + - image-release + if: ${{ inputs.push_image }} + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + 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 }}" diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml new file mode 100644 index 00000000000..d8aed24959f --- /dev/null +++ b/.github/workflows/frontends.yml @@ -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 }} diff --git a/.github/workflows/import-patch-image.yml b/.github/workflows/import-patch-image.yml index 13b5ee2b0d8..20de191621a 100755 --- a/.github/workflows/import-patch-image.yml +++ b/.github/workflows/import-patch-image.yml @@ -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 diff --git a/.github/workflows/import-save-sealos.yml b/.github/workflows/import-save-sealos.yml index 2b91cacfb54..5c2aee8e2b6 100755 --- a/.github/workflows/import-save-sealos.yml +++ b/.github/workflows/import-save-sealos.yml @@ -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 diff --git a/.github/workflows/objectstorage.yaml b/.github/workflows/objectstorage.yaml index 6a73be61f26..f27e59fe15a 100644 --- a/.github/workflows/objectstorage.yaml +++ b/.github/workflows/objectstorage.yaml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c5f7ef858e..c82057c3637 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index 75b7b2850ba..8cadba18cbf 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -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 diff --git a/.github/workflows/sync_code.yml b/.github/workflows/sync_code.yml index cb19b9f704f..1ef254953d2 100644 --- a/.github/workflows/sync_code.yml +++ b/.github/workflows/sync_code.yml @@ -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 diff --git a/.github/workflows/sync_docs.yml b/.github/workflows/sync_docs.yml index 9bd054624a8..71f9300c0a2 100644 --- a/.github/workflows/sync_docs.yml +++ b/.github/workflows/sync_docs.yml @@ -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 diff --git a/.github/workflows/webhooks.yml b/.github/workflows/webhooks.yml index 47d05e8a276..dd6248e315c 100644 --- a/.github/workflows/webhooks.yml +++ b/.github/workflows/webhooks.yml @@ -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 diff --git a/frontend/README.md b/frontend/README.md index ea1c24f7d97..29edd757441 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -68,7 +68,7 @@ make push-images DOCKER_USERNAME= IMAGE_TAG= Refer to other apps to add some configuration. -1. .github/workflows/frontend.yml +1. .github/workflows/frontends.yml 2. deploy/cloud/init.sh 3. deploy/cloud/scripts/init.sh 4. frontend/providers/app/deploy/manifests/appcr.yaml.tmpl diff --git a/scripts/resolve-tag-image.sh b/scripts/resolve-tag-image.sh index 36fad1db802..60e681fc037 100644 --- a/scripts/resolve-tag-image.sh +++ b/scripts/resolve-tag-image.sh @@ -7,7 +7,7 @@ push_image=${1:-false} release=${2:-false} if [[ "$push_image" == true ]]; then - tag_name=${3} + tag_name=${3:-latest} elif [[ "$release" == true ]]; then tag_name=${GITHUB_REF#refs/tags/} fi