From 1b3fbc7cde7e205f6db1e42f8327e06022153ab9 Mon Sep 17 00:00:00 2001 From: "Liav A." Date: Wed, 16 Oct 2024 14:51:43 +0300 Subject: [PATCH] refactor(ci): Remove most of the CI jobs Most of them are not needed right now, so let's remove them. --- .github/workflows/beta.yml | 127 -------- .github/workflows/dev.yml | 581 ---------------------------------- .github/workflows/release.yml | 75 ----- 3 files changed, 783 deletions(-) delete mode 100644 .github/workflows/beta.yml diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml deleted file mode 100644 index d60f7d72..00000000 --- a/.github/workflows/beta.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: Beta - -'on': - push: - tags: - - v*-beta - -jobs: - prerelease: - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup golang - uses: actions/setup-go@v5 - with: - go-version: '^1.21.0' - - - name: Setup nodejs - uses: actions/setup-node@v4 - with: - node-version: '16' - cache: 'npm' - cache-dependency-path: web/package-lock.json - - - name: Install go-task - run: | - go install github.com/go-task/task/v3/cmd/task@latest - - - name: Install rpm - run: | - sudo apt update && sudo apt-get install rpm - - - name: Install deps - run: | - task deps - - - name: Import gnupg - run: | - echo "${{ secrets.GPG_KEY }}" | tr " " "\n" | base64 -d | gpg --import --batch - gpg --sign -u "58A7 CC3D 8A9C A2E5 BB5C 141D 4064 23EA F814 63CA" --pinentry-mode loopback --yes --batch --passphrase "${{ secrets.GPG_PASS }}" --output unlock.sig --detach-sign README.md - rm -f unlock.sig - - - name: Reset repo - run: | - git reset --hard - - - name: Run release - run: | - GITHUB_TOKEN=${{ secrets.GH_TOKEN }} task release:prod - - deploy-beta: - runs-on: ubuntu-latest - if: github.repository_owner == 'semaphoreui' - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup qemu - id: qemu - uses: docker/setup-qemu-action@v3 - - - name: Setup buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Hub login - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Server meta - id: server - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - semaphoreui/semaphore - labels: | - org.opencontainers.image.vendor=SemaphoreUI - maintainer=Semaphore UI - tags: | - type=raw,value=${{ github.ref_name }} - flavor: | - latest=false - - - name: Server build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/server/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.server.outputs.labels }} - tags: ${{ steps.server.outputs.tags }} - - - name: Runner meta - id: runner - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - semaphoreui/runner - labels: | - org.opencontainers.image.vendor=SemaphoreUI - maintainer=Semaphore UI - tags: | - type=raw,value=${{ github.ref_name }} - flavor: | - latest=false - - - name: Runner build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/runner/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.runner.outputs.labels }} - tags: ${{ steps.runner.outputs.tags }} diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 0281f66f..6310c350 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -45,584 +45,3 @@ jobs: - name: Run tests run: task test - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: semaphore - path: bin/semaphore - retention-days: 1 - - migrate-boltdb: - runs-on: ubuntu-latest - - needs: - - build-local - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.json <- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 3306:3306 - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.json <- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 3306:3306 - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.json <- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.json < config.stdin <- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 3306:3306 - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup golang - uses: actions/setup-go@v5 - with: - go-version: '^1.21.0' - - - name: Setup nodejs - uses: actions/setup-node@v4 - with: - node-version: '16' - cache: 'npm' - cache-dependency-path: web/package-lock.json - - - name: Install go-task - run: | - go install github.com/go-task/task/v3/cmd/task@latest - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.stdin <- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 3306:3306 - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup golang - uses: actions/setup-go@v5 - with: - go-version: '^1.21.0' - - - name: Setup nodejs - uses: actions/setup-node@v4 - with: - node-version: '16' - cache: 'npm' - cache-dependency-path: web/package-lock.json - - - name: Install go-task - run: | - go install github.com/go-task/task/v3/cmd/task@latest - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.stdin <- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup golang - uses: actions/setup-go@v5 - with: - go-version: '^1.21.0' - - - name: Setup nodejs - uses: actions/setup-node@v4 - with: - node-version: '16' - cache: 'npm' - cache-dependency-path: web/package-lock.json - - - name: Install go-task - run: | - go install github.com/go-task/task/v3/cmd/task@latest - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: semaphore - - - name: Write config - run: | - cat > config.stdin < - tags: | - type=raw,value=develop - flavor: | - latest=false - - - name: Server build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/server/Dockerfile - platforms: linux/amd64,linux/arm64 #,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.server.outputs.labels }} - tags: ${{ steps.server.outputs.tags }} - - deploy-runner: - runs-on: ubuntu-latest - if: github.repository_owner == 'semaphoreui' - - needs: - - integrate-boltdb - - integrate-mysql - - integrate-mariadb - - integrate-postgres - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup qemu - id: qemu - uses: docker/setup-qemu-action@v3 - - - name: Setup buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Hub login - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Runner meta - id: runner - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - semaphoreui/runner - labels: | - org.opencontainers.image.vendor=SemaphoreUI - maintainer=Semaphore UI - tags: | - type=raw,value=develop - flavor: | - latest=false - - - name: Runner build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/runner/Dockerfile - platforms: linux/amd64,linux/arm64 #,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.runner.outputs.labels }} - tags: ${{ steps.runner.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7532b5bd..618145b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,78 +50,3 @@ jobs: - name: Run release run: | GITHUB_TOKEN=${{ secrets.GH_TOKEN }} task release:prod - - deploy-prod: - runs-on: ubuntu-latest - if: github.repository_owner == 'semaphoreui' - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup qemu - id: qemu - uses: docker/setup-qemu-action@v3 - - - name: Setup buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Hub login - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: Server meta - id: server - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - semaphoreui/semaphore - labels: | - org.opencontainers.image.vendor=SemaphoreUI - maintainer=Semaphore UI - tags: | - type=raw,value=${{ github.ref_name }} - flavor: | - latest=true - - - name: Server build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/server/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.server.outputs.labels }} - tags: ${{ steps.server.outputs.tags }} - - - name: Runner meta - id: runner - uses: docker/metadata-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - images: | - semaphoreui/runner - labels: | - org.opencontainers.image.vendor=SemaphoreUI - maintainer=Semaphore UI - tags: | - type=raw,value=${{ github.ref_name }} - flavor: | - latest=true - - - name: Runner build - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - context: . - file: deployment/docker/runner/Dockerfile - platforms: linux/amd64,linux/arm64 #,linux/arm/v6 - push: ${{ github.event_name != 'pull_request' }} - labels: ${{ steps.runner.outputs.labels }} - tags: ${{ steps.runner.outputs.tags }}