This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a github workflow for vc-to-dwn-server (#55)
* adding a github workflow for vc-to-dwn-server * Update .github/workflows/vc-to-dwn-server-container-image.yml Co-authored-by: Finn <[email protected]> --------- Co-authored-by: Rizel Scarlett <[email protected]> Co-authored-by: Finn <[email protected]>
- Loading branch information
1 parent
18bd246
commit 0aed53a
Showing
3 changed files
with
76 additions
and
55 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,71 @@ | ||
name: VC to DWN Server Container Image Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'javascript/vc-to-dwn-server/*' | ||
- .github/workflows/vc-to-dwn-server-container-image.yaml | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'javascript/vc-to-dwn-server/*' | ||
- .github/workflows/vc-to-dwn-server-container-image.yaml | ||
|
||
jobs: | ||
build-image: | ||
name: Build Container Image / javascript/vc-to-dwn-server | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the container registry | ||
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
|
||
- name: Extract metadata (tags, labels) | ||
id: meta | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | ||
with: | ||
images: ghcr.io/tbd54566975/tbd-examples-vc-to-dwn-server | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=sha | ||
- name: Build and push container image | ||
uses: docker/build-push-action@94f8f8c2eec4bc3f1d78c1755580779804cb87b2 # v6.0.1 | ||
with: | ||
context: javascript/vc-to-dwn-server | ||
push: true | ||
target: ${{ matrix.target }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Deploy new image | ||
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} | ||
run: | | ||
set -ex | ||
mkdir ~/.ssh | ||
echo "${{ secrets.VC_TO_DWN_SERVER_RELEASE_KEY }}" > ~/.ssh/id_ed25519 | ||
chmod 600 ~/.ssh/id_ed25519 | ||
git clone [email protected]:tbdeng/vc-to-dwn-server-helm | ||
cd tbd-vc-to-dwn-server | ||
git config user.email [email protected] | ||
git config user.name "tbd deployer" | ||
newtag="$(echo "${{ steps.meta.outputs.tags }}" | tail -n1)" | ||
sed -i "s#image: ghcr.io/tbd54566975/tbd-examples-vc-to-dwn-server:.*#image: ${newtag}#" values.yaml | ||
git commit values.yaml -m "Update image to ${newtag}" | ||
git push |
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,5 @@ | ||
node_modules | ||
npm-debug.log | ||
docker-compose.yml | ||
.DS_Store | ||
.git |
55 changes: 0 additions & 55 deletions
55
javascript/vc-to-dwn-server/.github/workflows/docker-image-publish.yaml
This file was deleted.
Oops, something went wrong.