Use IMAGE_TAG to set the docker image tag

This commit is contained in:
Marko Bocevski 2021-01-16 01:35:41 +01:00
parent b33fd5ebe2
commit 73063ff233
8 changed files with 63 additions and 7 deletions

View File

@ -22,23 +22,33 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-buildx ${{ 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 - name: Build CKAN 2.9 alpine
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.9 context: ./images/ckan/2.9
file: ./images/ckan/2.9/Dockerfile file: ./images/ckan/2.9/Dockerfile
push: false push: false
tags: keitaro/ckan:2.9 tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/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 - name: Build CKAN 2.9 ubuntu
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.9 context: ./images/ckan/2.9
file: ./images/ckan/2.9/Dockerfile.focal file: ./images/ckan/2.9/Dockerfile.focal
push: false push: false
tags: keitaro/ckan:2.9-focal tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
@ -58,23 +68,33 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ 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 - name: Build CKAN 2.8 alpine
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.8 context: ./images/ckan/2.8
file: ./images/ckan/2.8/Dockerfile file: ./images/ckan/2.8/Dockerfile
push: false push: false
tags: keitaro/ckan:2.8 tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/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 - name: Build CKAN 2.8 ubuntu
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.8 context: ./images/ckan/2.8
file: ./images/ckan/2.8/Dockerfile.focal file: ./images/ckan/2.8/Dockerfile.focal
push: false push: false
tags: keitaro/ckan:2.8-focal tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
@ -94,23 +114,33 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ 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 - name: Build CKAN 2.7 alpine
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.7 context: ./images/ckan/2.7
file: ./images/ckan/2.7/Dockerfile file: ./images/ckan/2.7/Dockerfile
push: false push: false
tags: keitaro/ckan:2.7 tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/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 - name: Build CKAN 2.7 ubuntu
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/ckan/2.7 context: ./images/ckan/2.7
file: ./images/ckan/2.7/Dockerfile.focal file: ./images/ckan/2.7/Dockerfile.focal
push: false push: false
tags: keitaro/ckan:2.7-focal tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
@ -130,12 +160,17 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ 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 - name: Build CKAN datapusher
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./images/datapusher context: ./images/datapusher
file: ./images/datapusher/Dockerfile file: ./images/datapusher/Dockerfile
push: false push: false
tags: keitaro/ckandatapusher:latest tags: keitaro/ckandatapusher:${{ steps.datapusher.outputs.IMAGE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache

View File

@ -3,6 +3,9 @@
################## ##################
FROM alpine:3.13 as ckanbuild FROM alpine:3.13 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.7.9
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.7.9 ENV GIT_BRANCH=ckan-2.7.9

View File

@ -3,6 +3,9 @@
################## ##################
FROM ubuntu:focal-20201106 as ckanbuild FROM ubuntu:focal-20201106 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.7.9-focal
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.7.9 ENV GIT_BRANCH=ckan-2.7.9

View File

@ -3,6 +3,9 @@
################## ##################
FROM alpine:3.13 as ckanbuild FROM alpine:3.13 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.8.6
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.8.6 ENV GIT_BRANCH=ckan-2.8.6

View File

@ -3,6 +3,9 @@
################## ##################
FROM ubuntu:focal-20201106 as ckanbuild FROM ubuntu:focal-20201106 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.8.6-focal
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.8.6 ENV GIT_BRANCH=ckan-2.8.6

View File

@ -3,6 +3,9 @@
################## ##################
FROM alpine:3.13 as ckanbuild FROM alpine:3.13 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.9.1
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.9.1 ENV GIT_BRANCH=ckan-2.9.1

View File

@ -3,6 +3,9 @@
################## ##################
FROM ubuntu:focal-20201106 as ckanbuild FROM ubuntu:focal-20201106 as ckanbuild
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=2.9.1-focal
# Set CKAN version to build # Set CKAN version to build
ENV GIT_URL=https://github.com/ckan/ckan.git ENV GIT_URL=https://github.com/ckan/ckan.git
ENV GIT_BRANCH=ckan-2.9.1 ENV GIT_BRANCH=ckan-2.9.1

View File

@ -3,6 +3,9 @@
############# #############
FROM alpine:3.13 as build FROM alpine:3.13 as build
# Used by Github Actions to tag the image with
ENV IMAGE_TAG=0.0.17
# Set datapusher version to build # Set datapusher version to build
ENV GIT_URL https://github.com/keitaroinc/datapusher.git ENV GIT_URL https://github.com/keitaroinc/datapusher.git
ENV GIT_BRANCH master ENV GIT_BRANCH master