-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
11 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,54 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Sr Izan's container registry | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
registry: containers.srizan.dev | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: containers.srizan.dev/vinci | ||
tags: latest | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Emit a webhook to the server | ||
env: | ||
AUTH_HEADER: ${{ secrets.WHSERVER_TOKEN }} | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: Bearer $AUTH_HEADER" \ | ||
https://webhooks.srizan.dev/hooks/automata |
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 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 |
---|---|---|
@@ -1,19 +1,26 @@ | ||
#!/bin/bash | ||
|
||
cd repos/sern-community | ||
git checkout -b docsjson | ||
git pull | ||
# merge all changes from main to docsjson to be updated | ||
git checkout docsjson | ||
git merge main | ||
git -c user.name="sern bot" -c user.email="$2" commit -m "chore: merge changes from main" | ||
git push https://sernbot:$1@github.com/sern-handler/sern-community.git | ||
|
||
cd .. | ||
cd website | ||
npm run typedoc-json | ||
cd .. | ||
cd sern-community | ||
git add . | ||
git commit -m "chore: update typedoc" | ||
git -c user.name="sern bot" -c user.email="$2" commit -m "chore: update typedoc" | ||
git push https://sernbot:$1@github.com/sern-handler/sern-community.git | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $1"\ | ||
-H "Authorization: Bearer $1" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/sern-handler/sern-community/pulls \ | ||
-d '{"title":"chore: update typedoc","body":"automated typedoc update (as of the new latest update in the handler)","head":"docsjson","base":"main"}' | ||
-d '{"title":"chore: update typedoc","body":"automated typedoc update (as of the new latest update in the handler)","head":"docsjson","base":"main"}' | ||
git checkout main |
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