Update trigger.txt #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
env: | |
REGISTRY: registry.cn-shenzhen.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 |