docker-ckan/.github/workflows/pr_checks.yml

176 lines
5.7 KiB
YAML
Raw Normal View History

name: PR Checks
on:
pull_request:
branches: master
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: Get docker tag for Alpine image
id: alpine
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)"
- 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:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
- name: Get docker tag for Ubuntu image
id: ubuntu
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)"
- 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:${{ steps.ubuntu.outputs.IMAGE_TAG }}
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: Get docker tag for Alpine image
id: alpine
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)"
- 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:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
- name: Get docker tag for Ubuntu image
id: ubuntu
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)"
- 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:${{ steps.ubuntu.outputs.IMAGE_TAG }}
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: Get docker tag for Alpine image
id: alpine
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)"
- 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:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
- name: Get docker tag for Ubuntu image
id: ubuntu
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)"
- 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:${{ steps.ubuntu.outputs.IMAGE_TAG }}
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: Get docker tag for datapusher image
id: datapusher
run: |
echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)"
- name: Build CKAN datapusher
uses: docker/build-push-action@v2
with:
context: ./images/datapusher
file: ./images/datapusher/Dockerfile
push: false
tags: keitaro/ckandatapusher:${{ steps.datapusher.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache