name: Build Stable on: push: branches: - main paths: - .github/** - build/** - installation/** - tests/** - .dockerignore - docker-bake.hcl - docker-compose.yml - env* # Triggered from frappe/frappe and frappe/erpnext on releases repository_dispatch: workflow_dispatch: jobs: build_frappe: name: Frappe runs-on: ubuntu-latest strategy: matrix: version: [12, 13] steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Buildx uses: docker/setup-buildx-action@v1 - name: Login uses: docker/login-action@v1 if: github.repository == 'frappe/frappe_docker' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Get latest versions run: | ./.github/scripts/get-latest-tags.sh echo "VERSION=$VERSION" >>$GITHUB_ENV echo "GIT_TAG=$FRAPPE_VERSION" >>$GITHUB_ENV echo "GIT_BRANCH=version-$VERSION" >>$GITHUB_ENV env: VERSION: ${{ matrix.version }} - name: Build uses: docker/bake-action@v1.6.0 with: files: docker-bake.hcl targets: frappe-stable-test load: true - name: Test run: ./tests/test-frappe.sh - name: Push if: github.repository == 'frappe/frappe_docker' uses: docker/bake-action@v1.6.0 with: files: docker-bake.hcl targets: frappe-stable push: true build_erpnext: name: ERPNext runs-on: ubuntu-latest needs: build_frappe strategy: matrix: version: [12, 13] steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Buildx uses: docker/setup-buildx-action@v1 - name: Login uses: docker/login-action@v1 if: github.repository == 'frappe/frappe_docker' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Get latest versions run: | ./.github/scripts/get-latest-tags.sh echo "VERSION=$VERSION" >>$GITHUB_ENV echo "GIT_TAG=$ERPNEXT" >>$GITHUB_ENV echo "GIT_BRANCH=version-$VERSION" >>$GITHUB_ENV env: VERSION: ${{ matrix.version }} - name: Build uses: docker/bake-action@v1.6.0 with: files: docker-bake.hcl targets: erpnext-stable-test load: true - name: Test run: ./tests/test-erpnext.sh - name: Push if: github.repository == 'frappe/frappe_docker' uses: docker/bake-action@v1.6.0 with: files: docker-bake.hcl targets: erpnext-stable push: true release_helm: name: Release Helm runs-on: ubuntu-latest if: github.repository == 'frappe/frappe_docker' needs: [build_frappe, build_erpnext] steps: - name: Setup deploy key uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }} - 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