v1.5.1.7 #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
RUBY_VERSION: 2.7.x | |
name: CI Build Release | |
on: | |
release: | |
types: [released] | |
jobs: | |
main: | |
name: Build Docker Image | |
env: | |
DOCKER_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} | |
DOCKER_BUILD_ENABLED: ${{ secrets.DOCKER_BUILD_ENABLED }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to DockerHub | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract Docker Repository | |
id: ci_docker_repository | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
shell: bash | |
run: echo "repository=$(echo ${DOCKER_REPOSITORY:-$GITHUB_REPOSITORY})" >> $GITHUB_OUTPUT | |
- name: Extract Tag Release Major | |
id: ci_tag_release_major | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
shell: bash | |
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/} | cut -f1-1 -d'.')" >> $GITHUB_OUTPUT | |
- name: Extract Tag Release Minor | |
id: ci_tag_release_minor | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
shell: bash | |
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/} | cut -f1-2 -d'.')" >> $GITHUB_OUTPUT | |
- name: Extract Tag Release Revision | |
id: ci_tag_release_revision | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
shell: bash | |
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT | |
- name: Build and Push nginx | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
target: nginx | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-nginx" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Build and Push api | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
target: api | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-api" | |
build-args: "BUILD_NUMBER=${{ steps.ci_tag_release_revision.outputs.tag }}" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Build and Push poller | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
target: poller | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-poller" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Build and Push recording-importer | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
target: recording-importer | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-recording-importer" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
# Alternate Images for bbb-focal-260 with alpine | |
- name: Alternate Alpine Build and Push nginx | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-alpine | |
push: true | |
target: nginx | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-alpine-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-alpine-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-alpine-nginx" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Alpine Build and Push api | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-alpine | |
push: true | |
target: api | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-alpine" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-alpine" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-alpine" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-alpine-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-alpine-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-alpine-api" | |
build-args: "BUILD_NUMBER=${{ steps.ci_tag_release_revision.outputs.tag }}" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Alpine Build and Push poller | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-alpine | |
push: true | |
target: poller | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-alpine-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-alpine-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-alpine-poller" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Alpine Build and Push recording-importer | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-alpine | |
push: true | |
target: recording-importer | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-alpine-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-alpine-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-alpine-recording-importer" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
# Alternate Images for bbb-focal-260 with amazonlinux | |
- name: Alternate Amazon Linux Build and Push nginx | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: nginx | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-nginx" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push api | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: api | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-api" | |
build-args: "BUILD_NUMBER=${{ steps.ci_tag_release_revision.outputs.tag }}" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push poller | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: poller | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-poller" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push recording-importer | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: recording-importer | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
# Alternate Images for bbb-focal-260 with amazonlinux | |
- name: Alternate Amazon Linux Build and Push nginx | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: nginx | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-nginx" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-nginx" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push api | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: api | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-api" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-api" | |
build-args: "BUILD_NUMBER=${{ steps.ci_tag_release_revision.outputs.tag }}" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push poller | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: poller | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-poller" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-poller" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Alternate Amazon Linux Build and Push recording-importer | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
uses: docker/build-push-action@v3 | |
with: | |
file: dockerfiles/v1/focal260-amazonlinux | |
push: true | |
target: recording-importer | |
tags: | | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_major.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_minor.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
"${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release_revision.outputs.tag }}-focal260-amazonlinux-recording-importer" | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Move cache | |
if: contains(env.DOCKER_BUILD_ENABLED, 'true') | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |