diff --git a/.github/workflows/build_develop.yml b/.github/workflows/_build_develop.yml similarity index 100% rename from .github/workflows/build_develop.yml rename to .github/workflows/_build_develop.yml diff --git a/.github/workflows/build_stable.yml b/.github/workflows/_build_stable.yml similarity index 100% rename from .github/workflows/build_stable.yml rename to .github/workflows/_build_stable.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..85cb1b13 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,49 @@ +name: Build + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + + strategy: + matrix: + version: [12, 13] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Setup Buildx + uses: docker/setup-buildx-action@v1 + with: + driver-opts: network=host + + - name: Install Docker Compose v2 + uses: ndeloof/install-compose-action@4a33bc31f327b8231c4f343f6fba704fedc0fa23 + + - name: Get latest versions + run: ./.github/scripts/get-latest-tags.sh + env: + VERSION: ${{ matrix.version }} + + - name: Build + uses: docker/bake-action@v1.6.0 + with: + push: true + env: + USERNAME: localhost:5000/frappe + + - name: Test + run: python3 tests/main.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 7f10ab85..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Integration Test - -on: - push: - branches: - - main - paths: - - .github/workflows/test.yml - - .github/scripts/get-latest-tags.sh - - build/** - - installation/** - - tests/** - - .dockerignore - - docker-bake.hcl - - env-example - - pull_request: - branches: - - main - paths: - - .github/workflows/test.yml - - .github/scripts/get-latest-tags.sh - - build/** - - installation/** - - tests/** - - .dockerignore - - docker-bake.hcl - - env-example - - workflow_dispatch: - - schedule: - # Every day at 01:00 am - # Develop images are built at 12:00 pm, we want to use them - # Also, we don't build new images on this event - - cron: 0 1 * * * - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get latest versions - if: github.event_name != 'schedule' - run: ./.github/scripts/get-latest-tags.sh - env: - VERSION: 13 - - - name: Build - if: github.event_name != 'schedule' - uses: docker/bake-action@v1.6.0 - with: - files: docker-bake.hcl - targets: frappe-develop,frappe-stable - load: true - env: - GIT_TAG: ${{ env.FRAPPE_VERSION }} - - - name: Test - run: ./tests/integration-test.sh