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 4c75616fd6 Added: Log in to ghcr.io before building and pushing container image (OFBIZ-12757) 4c75616fd6 is described below commit 4c75616fd61e4a0e2c409bb1e016f8c4a8e065fd Author: Daniel Watford <dan...@watfordconsulting.com> AuthorDate: Wed Mar 1 17:27:43 2023 +0000 Added: Log in to ghcr.io before building and pushing container image (OFBIZ-12757) --- .github/workflows/docker-image.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 9cd1e291dc..a77e1e983d 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -35,18 +35,22 @@ jobs: with: images: ghcr.io/apache/ofbiz-framework tags: | - # When this build is triggered by pusing a git tag, use the string following 'release' as the container tag - # value. + # Extract container tag from git tag. type=match,pattern=release(.*),group=1 - # When this build is triggered by pushing to a branch, use the branch name with the suffix - # '-branch-snapshot' as the container tag value. + # Build container tag based on branch name and string '-branch-snapshot' type=ref,event=branch,suffix=-branch-snapshot - # When this build is triggered by pushing to a branch, use the branch name with the commit's short SHA - # as the container tag value. + # Construct container tag based on branch name, string 'branch' and the short format of the commit SHA. type=ref,event=branch,suffix=-branch-{{sha}} + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 with: context: . push: true