Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzeng committed Jun 24, 2022
1 parent 5a0164c commit b63f4d6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
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 }}
5 changes: 5 additions & 0 deletions .vscode/settings.json
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"
}
}

0 comments on commit b63f4d6

Please sign in to comment.