This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
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
2 changed files
with
47 additions
and
0 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,42 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/** | ||
|
||
jobs: | ||
build: | ||
name: Build and push image onto dockerhub and ghcr | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install pnpm and dependencies | ||
uses: pnpm/[email protected] | ||
with: | ||
run_install: true | ||
- name: Build project | ||
run: pnpm build | ||
- uses: wdzeng/image@v1 | ||
with: | ||
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
tag: | ||
name: Add tags to repository | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: version | ||
uses: wdzeng/version@v1 | ||
with: | ||
prefix: v | ||
- name: Add tags | ||
run: | | ||
git tag -f ${{ steps.version.outputs.version }} main && \ | ||
git push -f origin ${{ steps.version.outputs.version }} |
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 @@ | ||
{ | ||
"yaml.schemas": { | ||
"https://json.schemastore.org/github-workflow.json": "file:///home/hyperbola/repo/pinkoi-coins-bot/.github/workflows/build.yml" | ||
} | ||
} |