This is an automated email from the ASF dual-hosted git repository.
danwatford pushed a commit to branch experimental-docker
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/experimental-docker by this
push:
new 52a9c46312 Added: Build container image with demo data preloaded
(OFBIZ-12757)
52a9c46312 is described below
commit 52a9c46312ee436e0c0eb62f0a1203d094beca47
Author: Daniel Watford <[email protected]>
AuthorDate: Wed Mar 1 17:45:49 2023 +0000
Added: Build container image with demo data preloaded (OFBIZ-12757)
---
.github/workflows/docker-image.yaml | 49 ++++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/docker-image.yaml
b/.github/workflows/docker-image.yaml
index a77e1e983d..11e9f223e0 100644
--- a/.github/workflows/docker-image.yaml
+++ b/.github/workflows/docker-image.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-name: Docker image build
+name: Build and push docker images
on:
push:
@@ -29,30 +29,51 @@ jobs:
- name: Check out OFBiz sources
uses: actions/checkout@v3
- - name: Extract metadata (tags, labels) for Docker
- id: meta
+ - name: Log in to the Container registry
+ uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Determine metadata (tags, labels) for Docker runtime build
+ id: runtimemeta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
with:
- images: ghcr.io/apache/ofbiz-framework
+ images: ghcr.io/apache/ofbiz
tags: |
# Extract container tag from git tag.
type=match,pattern=release(.*),group=1
# Build container tag based on branch name and string
'-branch-snapshot'
- type=ref,event=branch,suffix=-branch-snapshot
+ type=ref,event=branch,suffix=-branch-snapshot,priority=650
# Construct container tag based on branch name, string 'branch' and
the short format of the commit SHA.
- type=ref,event=branch,suffix=-branch-{{sha}}
+ type=ref,event=branch,suffix=-branch-{{sha}},priority=600
- - name: Log in to the Container registry
- uses: docker/login-action@v1
+ - name: Build runtime docker image
+ uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
+ context: .
+ target: runtime
+ push: true
+ tags: ${{ steps.runtimemeta.outputs.tags }}
+ labels: ${{ steps.runtimemeta.outputs.labels }}
- - name: Build Docker image
+ - name: Determine metadata (tags, labels) for Docker demo-preload build
+ id: demometa
+ uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
+ with:
+ images: ghcr.io/apache/ofbiz
+ tags: |
+ type=match,pattern=release(.*),group=1,suffix=-preloaddemo
+
type=ref,event=branch,suffix=-branch-preloaddemo-snapshot,priority=650
+ type=ref,event=branch,suffix=-branch-preloaddemo-{{sha}},priority=600
+
+ - name: Build demo docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
+ target: demo
push: true
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
+ tags: ${{ steps.demometa.outputs.tags }}
+ labels: ${{ steps.demometa.outputs.labels }}
+