Skip to content

Merge pull request #23 from danni-cool/dev #19

Merge pull request #23 from danni-cool/dev

Merge pull request #23 from danni-cool/dev #19

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- main
jobs:
build:
if: contains(github.event.head_commit.message, '[skip ci]') == false
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: SetUp Node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install devDependencies
run: npm install --only=dev
- name: Generate changelog and push changes
run: |
npm run release
git config --global user.email "[email protected]"
git config --global user.name "gitHubCi"
git add .
git commit -m "Commit changes for release"
git push origin main
- name: Get Package Version
id: get_version
run: echo "::set-output name=package_version::$(node -p "require('./package.json').version")"
- name: Create Github Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.package_version }}
release_name: Release v${{ steps.get_version.outputs.package_version }}
body: |
更新内容参见 [CHANGELOG](https://github.com/danni-cool/docker-wechatbot-webhook/blob/main/CHANGELOG.md)
draft: false
prerelease: false
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: dannicool
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
run: |
docker build . -t dannicool/docker-wechatbot-webhook:latest
docker push dannicool/docker-wechatbot-webhook:latest