diff --git a/.github/workflows/_build_stable.yml b/.github/workflows/_build_stable.yml deleted file mode 100644 index 1126ac9b..00000000 --- a/.github/workflows/_build_stable.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: Build Stable - -on: - pull_request: - branches: - - main - paths: - - .github/workflows/build_stable.yml - - .github/scripts/get-latest-tags.sh - - build/** - - installation/** - - tests/** - - .dockerignore - - docker-bake.hcl - - env-example - - push: - branches: - - main - paths: - - .github/workflows/build_stable.yml - - .github/scripts/get-latest-tags.sh - - build/** - - installation/** - - tests/** - - .dockerignore - - docker-bake.hcl - - env-example - - # Triggered from frappe/frappe and frappe/erpnext on releases - repository_dispatch: - - workflow_dispatch: - -env: - IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} - -jobs: - build: - name: Frappe & ERPNext - runs-on: ubuntu-latest - strategy: - matrix: - version: [12, 13] - services: - registry: - image: registry:2 - ports: - - 5000:5000 - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Buildx - uses: docker/setup-buildx-action@v1 - with: - driver-opts: network=host - - - name: Login - uses: docker/login-action@v1 - if: env.IS_AUTHORIZED_RUN == 'true' - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Get latest versions - run: ./.github/scripts/get-latest-tags.sh - env: - VERSION: ${{ matrix.version }} - - - name: Build Frappe - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-stable-test - load: true - - - name: Push Frappe to local registry - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-stable-test-local - push: true - - - name: Test Frappe - if: github.event_name == 'pull_request' - run: ./tests/test-frappe.sh - - - name: Build ERPNext - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: erpnext-stable-test - load: true - - - name: Test ERPNext - if: github.event_name == 'pull_request' - run: ./tests/test-erpnext.sh - - - name: Push Frappe - if: env.IS_AUTHORIZED_RUN == 'true' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-stable - push: true - env: - GIT_TAG: ${{ env.FRAPPE_VERSION }} - - - name: Push ERPNext - if: env.IS_AUTHORIZED_RUN == 'true' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: erpnext-stable - push: true - env: - GIT_TAG: ${{ env.ERPNEXT_VERSION }} - - release_helm: - name: Release Helm - runs-on: ubuntu-latest - if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' - needs: build - - steps: - - name: Setup deploy key - uses: webfactory/ssh-agent@v0.5.4 - with: - ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }} - - - name: Setup Git Credentials - run: | - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - - name: Release - run: | - git clone git@github.com:frappe/helm.git && cd helm - pip install -r release_wizard/requirements.txt - ./release_wizard/wizard 13 patch --remote origin --ci diff --git a/.github/workflows/main.yml b/.github/workflows/build_stable.yml similarity index 99% rename from .github/workflows/main.yml rename to .github/workflows/build_stable.yml index b015c1cc..6c9eb22d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/build_stable.yml @@ -1,4 +1,4 @@ -name: Build +name: Build Stable on: push: