Skip to content

fix: signature header #12

fix: signature header

fix: signature header #12

name: Docker Image CI
on:
push:
branches:
- dev
# 定义环境变量, 后面会使用
# 定义 DOCKERHUB_REPO 标记 docker hub repo 名称
env:
DOCKERHUB_REPO: pupilcc/pushbot
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: pupilcc/pushbot
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.DOCKERHUB_REPO }}:dev
labels: ${{ steps.meta.outputs.labels }}
- name: Invoke deployment hook
uses: distributhor/workflow-webhook@v3
env:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}