Skip to content

πŸ§‘β€πŸ’» add github action auto commit Build Artifact #4

πŸ§‘β€πŸ’» add github action auto commit Build Artifact

πŸ§‘β€πŸ’» add github action auto commit Build Artifact #4

name: Auto Commit Build Artifact
permissions:
contents: write
packages: write
on:
push:
workflow_dispatch:
env:
IMAGE_TAG: ${{ github.ref_name }}
IMAGE_NAME: ghcr.io/${{ github.repository }}
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- run: |
npm i -g pnpm
pnpm install
pnpm run build
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: "dist"
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
push: true
default_author: github_actions
committer_name: GitHub Actions
committer_email: actions@github.com
message: '🚨 Commit Build Artifact from GitHub Actions'