|
@@ -3,7 +3,13 @@ name: Reusable build app container image workflow
|
|
|
on:
|
|
on:
|
|
|
workflow_call:
|
|
workflow_call:
|
|
|
inputs:
|
|
inputs:
|
|
|
- tag-version:
|
|
|
|
|
|
|
+ tags:
|
|
|
|
|
+ type: string
|
|
|
|
|
+ required: true
|
|
|
|
|
+ image-name:
|
|
|
|
|
+ type: string
|
|
|
|
|
+ default: weseek/growi
|
|
|
|
|
+ tag-temporary:
|
|
|
type: string
|
|
type: string
|
|
|
default: latest
|
|
default: latest
|
|
|
secrets:
|
|
secrets:
|
|
@@ -47,11 +53,11 @@ jobs:
|
|
|
image-override: ${{ (matrix.platform == 'amd64' && 'aws/codebuild/standard:6.0') || 'aws/codebuild/amazonlinux2-aarch64-standard:2.0' }}
|
|
image-override: ${{ (matrix.platform == 'amd64' && 'aws/codebuild/standard:6.0') || 'aws/codebuild/amazonlinux2-aarch64-standard:2.0' }}
|
|
|
environment-type-override: ${{ (matrix.platform == 'amd64' && 'LINUX_CONTAINER') || 'ARM_CONTAINER' }}
|
|
environment-type-override: ${{ (matrix.platform == 'amd64' && 'LINUX_CONTAINER') || 'ARM_CONTAINER' }}
|
|
|
env-vars-for-codebuild: |
|
|
env-vars-for-codebuild: |
|
|
|
- TAG_VERSION,
|
|
|
|
|
- TAG_SUFFIX
|
|
|
|
|
|
|
+ IMAGE_TAG,
|
|
|
|
|
+ IMAGE_TAG_GHCR
|
|
|
env:
|
|
env:
|
|
|
- TAG_VERSION: ${{ inputs.tag-version }}
|
|
|
|
|
- TAG_SUFFIX: ${{ matrix.platform }}
|
|
|
|
|
|
|
+ IMAGE_TAG: docker.io/${{ inputs.image-name }}:${{ inputs.tag-temporary }}-${{ matrix.platform }}
|
|
|
|
|
+ IMAGE_TAG_GHCR: ghcr.io/${{ inputs.image-name }}:${{ inputs.tag-temporary }}-${{ matrix.platform }}
|
|
|
|
|
|
|
|
|
|
|
|
|
create-manifest:
|
|
create-manifest:
|
|
@@ -69,25 +75,15 @@ jobs:
|
|
|
uses: myrotvorets/info-from-package-json-action@1.2.0
|
|
uses: myrotvorets/info-from-package-json-action@1.2.0
|
|
|
id: package-json
|
|
id: package-json
|
|
|
|
|
|
|
|
- - name: Docker meta for base-image
|
|
|
|
|
- id: meta-base-image
|
|
|
|
|
- uses: docker/metadata-action@v4
|
|
|
|
|
- with:
|
|
|
|
|
- images: ${{ matrix.registry }}/weseek/growi-codebuild-test
|
|
|
|
|
- sep-tags: ','
|
|
|
|
|
- tags: |
|
|
|
|
|
- type=raw,value=${{ steps.package-json.outputs.packageVersion }}
|
|
|
|
|
- type=raw,value=${{ steps.package-json.outputs.packageVersion }}.{{sha}}
|
|
|
|
|
-
|
|
|
|
|
- name: Docker meta for extra-images
|
|
- name: Docker meta for extra-images
|
|
|
id: meta-extra-images
|
|
id: meta-extra-images
|
|
|
uses: docker/metadata-action@v4
|
|
uses: docker/metadata-action@v4
|
|
|
with:
|
|
with:
|
|
|
- images: ${{ matrix.registry }}/weseek/growi-codebuild-test
|
|
|
|
|
|
|
+ images: ${{ matrix.registry }}/${{ inputs.image-name }}
|
|
|
sep-tags: ','
|
|
sep-tags: ','
|
|
|
tags: |
|
|
tags: |
|
|
|
- type=raw,value=${{ inputs.tag-version }}-amd64
|
|
|
|
|
- type=raw,value=${{ inputs.tag-version }}-arm64
|
|
|
|
|
|
|
+ type=raw,value=${{ inputs.tag-temporary }}-amd64
|
|
|
|
|
+ type=raw,value=${{ inputs.tag-temporary }}-arm64
|
|
|
|
|
|
|
|
- name: Login to Container Registry
|
|
- name: Login to Container Registry
|
|
|
uses: docker/login-action@v2
|
|
uses: docker/login-action@v2
|
|
@@ -99,6 +95,6 @@ jobs:
|
|
|
- name: Create and push manifest images for ${{ matrix.registry }}
|
|
- name: Create and push manifest images for ${{ matrix.registry }}
|
|
|
uses: Noelware/docker-manifest-action@master
|
|
uses: Noelware/docker-manifest-action@master
|
|
|
with:
|
|
with:
|
|
|
- base-image: ${{ steps.meta-base-image.outputs.tags }}
|
|
|
|
|
|
|
+ base-image: ${{ inputs.tags }}
|
|
|
extra-images: ${{ steps.meta-extra-images.outputs.tags }}
|
|
extra-images: ${{ steps.meta-extra-images.outputs.tags }}
|
|
|
push: true
|
|
push: true
|