Skip to content

Commit

Permalink
Update GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Isnubi committed Nov 14, 2024
1 parent 5cb496c commit f93b811
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,21 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
- name: Extract Docker metadata for WEB MANAGER
id: meta-web-manager
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-web-manager
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
- name: Extract Docker metadata for REVERSE PROXY
id: meta-reverse-proxy
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-reverse-proxy
tags: |
type=raw,value=latest,enable={{is_default_branch}}
Expand All @@ -59,8 +68,8 @@ jobs:
context: ./web-manager
file: ./web-manager/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-web-manager.outputs.tags }}
labels: ${{ steps.meta-web-manager.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -71,21 +80,21 @@ jobs:
context: ./reverse-proxy
file: ./reverse-proxy/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta-reverse-proxy.outputs.tags }}
labels: ${{ steps.meta-reverse-proxy.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Sign the published WEB MANAGER Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
TAGS: ${{ steps.meta.outputs.tags }}
TAGS: ${{ steps.meta-web-manager.outputs.tags }}
DIGEST: ${{ steps.build-and-push-web-manager.outputs.digest }}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

- name: Sign the published REVERSE PROXY Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
TAGS: ${{ steps.meta.outputs.tags }}
TAGS: ${{ steps.meta-reverse-proxy.outputs.tags }}
DIGEST: ${{ steps.build-and-push-reverse-proxy.outputs.digest }}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 comments on commit f93b811

Please sign in to comment.