mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 07:43:54 +08:00
Add slack message sending + upgrade docker build process
This commit is contained in:
parent
b3645b33dd
commit
cbcd4ea92f
1 changed files with 22 additions and 4 deletions
26
.github/workflows/main.yml
vendored
26
.github/workflows/main.yml
vendored
|
@ -102,13 +102,23 @@ jobs:
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Publish to Docker Registry
|
- name: Docker meta
|
||||||
uses: docker/build-push-action@v1
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: simplelogin/app-ci
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
repository: simplelogin/app-ci
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
tag_with_ref: true
|
|
||||||
|
- name: Build image and publish to Docker Registry
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
- name: Create Sentry release
|
- name: Create Sentry release
|
||||||
uses: getsentry/action-release@v1
|
uses: getsentry/action-release@v1
|
||||||
|
@ -123,3 +133,11 @@ jobs:
|
||||||
to: ${{ secrets.TELEGRAM_TO }}
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
args: Docker image pushed on ${{ github.ref }}
|
args: Docker image pushed on ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: Post notification to Slack
|
||||||
|
uses: slackapi/slack-github-action@v1.19.0
|
||||||
|
with:
|
||||||
|
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
|
||||||
|
slack-message: "New tag generated: ${{github.ref}}\nBuild result: ${{ job.status }}"
|
||||||
|
env:
|
||||||
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue