From b33fd5ebe299736c06f3a699455c18b2ea6ce1c5 Mon Sep 17 00:00:00 2001 From: Marko Bocevski Date: Sat, 16 Jan 2021 00:23:36 +0100 Subject: [PATCH] Add workflow for pull requests on master --- .github/workflows/pr_checks.yml | 141 ++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 .github/workflows/pr_checks.yml diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml new file mode 100644 index 0000000..38a00fa --- /dev/null +++ b/.github/workflows/pr_checks.yml @@ -0,0 +1,141 @@ +name: PR Checks + +on: + pull_request: + branches: master + workflow_dispatch: + +jobs: + build-ckan-2-9: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx + + - name: Build CKAN 2.9 alpine + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.9 + file: ./images/ckan/2.9/Dockerfile + push: false + tags: keitaro/ckan:2.9 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + - name: Build CKAN 2.9 ubuntu + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.9 + file: ./images/ckan/2.9/Dockerfile.focal + push: false + tags: keitaro/ckan:2.9-focal + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + build-ckan-2-8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Build CKAN 2.8 alpine + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.8 + file: ./images/ckan/2.8/Dockerfile + push: false + tags: keitaro/ckan:2.8 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + - name: Build CKAN 2.8 ubuntu + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.8 + file: ./images/ckan/2.8/Dockerfile.focal + push: false + tags: keitaro/ckan:2.8-focal + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + build-ckan-2-7: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Build CKAN 2.7 alpine + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.7 + file: ./images/ckan/2.7/Dockerfile + push: false + tags: keitaro/ckan:2.7 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + - name: Build CKAN 2.7 ubuntu + uses: docker/build-push-action@v2 + with: + context: ./images/ckan/2.7 + file: ./images/ckan/2.7/Dockerfile.focal + push: false + tags: keitaro/ckan:2.7-focal + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + + build-ckan-datapusher: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Build CKAN datapusher + uses: docker/build-push-action@v2 + with: + context: ./images/datapusher + file: ./images/datapusher/Dockerfile + push: false + tags: keitaro/ckandatapusher:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache