From e449feaa1cd9ef7ca714f3b43dd9d93c509282a0 Mon Sep 17 00:00:00 2001 From: Henrique Goncalves Date: Mon, 24 Feb 2025 17:27:05 -0300 Subject: [PATCH] chore: leave fork network Signed-off-by: Henrique Goncalves --- .github/workflows/release-chart.yml | 30 --------- .github/workflows/release-docker-branch.yml | 17 ----- .github/workflows/release-docker-latest.yml | 26 -------- .github/workflows/release-docker.yml | 18 ------ .github/workflows/release-website.yml | 71 --------------------- .github/workflows/release.yml | 22 ++----- .github/workflows/versioning.yml | 30 +++++++++ 7 files changed, 36 insertions(+), 178 deletions(-) delete mode 100644 .github/workflows/release-chart.yml delete mode 100644 .github/workflows/release-docker-branch.yml delete mode 100644 .github/workflows/release-docker-latest.yml delete mode 100644 .github/workflows/release-docker.yml delete mode 100644 .github/workflows/release-website.yml create mode 100644 .github/workflows/versioning.yml diff --git a/.github/workflows/release-chart.yml b/.github/workflows/release-chart.yml deleted file mode 100644 index dd1dffd0..00000000 --- a/.github/workflows/release-chart.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Release Helm Chart - -on: - push: - paths: - - 'helm/transfer/**' - - pull_request: - paths: - - 'helm/transfer/**' - -jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Helm - uses: azure/setup-helm@v3 - - - name: Package helm - env: - GITHUB_USERNAME: laskoviymishka - GHCR_TOKEN: ${{ secrets.GH_HELM_PAT }} - HELM_EXPERIMENTAL_OCI: 1 - run: | - make helm-push - make clean diff --git a/.github/workflows/release-docker-branch.yml b/.github/workflows/release-docker-branch.yml deleted file mode 100644 index 9cdbd188..00000000 --- a/.github/workflows/release-docker-branch.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Auto build and publish of Transfer For PR - -on: - pull_request: - branches: - - "*" - -jobs: - trigger-build-pr: - permissions: - contents: write - packages: write - uses: ./.github/workflows/release.yml - with: - version: '${{ github.event.pull_request.number }}' - extra_args: '--snapshot' - diff --git a/.github/workflows/release-docker-latest.yml b/.github/workflows/release-docker-latest.yml deleted file mode 100644 index aa3f06b1..00000000 --- a/.github/workflows/release-docker-latest.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Auto build and publish of Transfer image - -on: - push: - branches: - - 'main' - -jobs: - trigger-build-dev: - permissions: - contents: write - packages: write - uses: ./.github/workflows/release.yml - with: - version: dev - extra_args: '--snapshot' - - trigger-build-latest: - permissions: - contents: write - packages: write - uses: ./.github/workflows/release.yml - with: - version: latest - extra_args: '--snapshot' - diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml deleted file mode 100644 index a69bbeaa..00000000 --- a/.github/workflows/release-docker.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Auto build and publish of Transfer image - -on: - push: - branches: - - 'release-*' - tags: - - 'v*.*.*' - -jobs: - trigger-build: - permissions: - contents: write - packages: write - uses: ./.github/workflows/release.yml - with: - version: ${{ github.ref_name }} - diff --git a/.github/workflows/release-website.yml b/.github/workflows/release-website.yml deleted file mode 100644 index 55775ac2..00000000 --- a/.github/workflows/release-website.yml +++ /dev/null @@ -1,71 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Website - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - push: - paths: - - "docs/**" - branches: - - "main" - pull_request: - branches: - - "main" - paths: - - "docs/**" - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Build docs - uses: diplodoc-platform/docs-build-action@v3 - with: - src-root: "./docs" - build-root: "./docs-html" - # Build the landing page - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' # Укажите подходящую версию Node.js - - - name: Install dependencies for landing page - run: | - cd docs/website - npm install -g js-yaml - npm install --legacy-peer-deps - - - name: Build landing page - run: | - cd docs/website - PUBLIC_URL=/transfer npm run build - cd ../../ - ls ./_docs-lint - cp -r ./_docs-lint ./docs/website/build/docs - # Upload the landing page build artifact - - name: Upload landing page artifact - uses: actions/upload-pages-artifact@v3 - with: - path: './docs/website/build' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9dffc468..072b79ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,14 @@ on: + push: + tags: + - "*" workflow_call: inputs: extra_args: description: Extra args for go-releaser, for example '--snapshot' required: false type: string - version: - description: Version of base Transfer image - required: true - type: string permissions: {} -env: - REGISTRY: ghcr.io - IMAGE_NAME: doublecloud/transfer jobs: build-and-push-image: runs-on: ubuntu-latest @@ -23,11 +19,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Dump version - run: | - echo "${{ inputs }}" - echo "${{ inputs.version }}" - - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -37,11 +28,10 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # @v3 + uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml new file mode 100644 index 00000000..f078ad43 --- /dev/null +++ b/.github/workflows/versioning.yml @@ -0,0 +1,30 @@ +name: Versioning + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + versioning: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + - name: Calculate version + id: calculate-version + uses: bitshifted/git-auto-semver@v1 + with: + main_branch: main + create_tag: true + tag_prefix: "v" + release: + needs: [versioning] + uses: ./.github/workflows/release.yml + secrets: inherit