Skip to content

Update trigger.txt

Update trigger.txt #6

Workflow file for this run

name: Docker
on:
push:
branches: [ main ]
# pull_request:
# branches: [ main ]
env:
REGISTRY: registry.cn-hangzhou.aliyuncs.com
ALIYUN_REGISTRY_USER: "${{ secrets.ALIYUN_REGISTRY_USER }}"
ALIYUN_REGISTRY_PASSWORD: "${{ secrets.ALIYUN_REGISTRY_PASSWORD }}"
MM_NOTIFY_URL: "${{ secrets.MM_NOTIFY_URL }}"
jobs:
build:
name: Pull
runs-on: ubuntu-latest
steps:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Check out code
uses: actions/checkout@v2
- name: Build and push image to ACR EE
run: |
docker login -u $ALIYUN_REGISTRY_USER -p $ALIYUN_REGISTRY_PASSWORD $REGISTRY
sh pull.sh
data=`cat trigger.txt`
if [ $MM_NOTIFY_URL ];then
curl -H 'Content-Type: application/json' \
-d "{\"msgtype\": \"text\",\"text\": {\"content\":\"同步成功 $data \"}}" \
$MM_NOTIFY_URL
else
echo 'MM_NOTIFY_URL not set'
fi