-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jason C. Leach <[email protected]>
- Loading branch information
Showing
6 changed files
with
172 additions
and
70 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Docker Build | ||
description: Build Docker Image | ||
inputs: | ||
context: | ||
description: Docker context path | ||
required: true | ||
default: dist | ||
dockerfile: | ||
description: Dockerfile path | ||
required: true | ||
registry: | ||
description: Docker registry | ||
required: true | ||
image_name: | ||
description: Docker image name | ||
required: true | ||
docker_user: | ||
description: Docker user | ||
required: true | ||
docker_password: | ||
description: Docker password | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ inputs.registry }} | ||
username: ${{ inputs.docker_user }} | ||
password: ${{ inputs.docker_password }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ inputs.registry }}/${{ inputs.image_name }} | ||
tags: | | ||
type=sha,prefix= | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ${{ inputs.context }} | ||
file: ${{ inputs.dockerfile }} | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# based on https://github.com/hyperledger/aries-framework-javascript-ext/blob/main/.github/actions/setup-node/action.yml | ||
name: Setup NodeJS | ||
description: Setup NodeJS with caching | ||
author: "[email protected]" | ||
|
||
inputs: | ||
node-version: | ||
description: Select the nodejs version to use | ||
required: false | ||
default: "18.18.2" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Add package manager | ||
shell: bash | ||
run: | | ||
corepack enable | ||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: Setup node v${{ inputs.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: "https://registry.npmjs.org/" | ||
cache: "pnpm" | ||
|
||
- name: Node Version | ||
shell: bash | ||
run: | | ||
node -v && pnpm -v |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Release | ||
|
||
on: | ||
# push: | ||
# tags: | ||
# - v* | ||
workflow_run: | ||
workflows: [Quality] | ||
branches: [main] | ||
types: | ||
- completed | ||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
release-image: | ||
name: Publish Image | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker image | ||
uses: ./.github/actions/docker-build | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
image_name: "${{ github.repository }}/mediator" | ||
context: ./ | ||
dockerfile: "Dockerfile" | ||
docker_user: ${{ github.actor }} | ||
docker_password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Log in to the Container registry | ||
# uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
# with: | ||
# registry: ${{ env.REGISTRY }} | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Extract metadata (tags, labels) for Docker | ||
# id: meta | ||
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
# with: | ||
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# - name: Build and push Docker image | ||
# id: push | ||
# uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
# with: | ||
# context: . | ||
# push: true | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
|
||
# - name: Generate artifact attestation | ||
# uses: actions/attest-build-provenance@v2 | ||
# with: | ||
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||
# subject-digest: ${{ steps.push.outputs.digest }} | ||
# push-to-registry: true |
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