-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.98 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: ci
on:
push:
branches:
- "main"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
id: login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_USER }}/folhoso
- name: Build and push
id: build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_USER }}/folhoso:latest
- name: Update Repo Description
id: repo
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKER_USER }}/folhoso
- name: Success Discord Notification
if: success()
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
details: Sucesso no build!
username: Octocat
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
- name: Failure Discord Notification
if: failure()
uses: rjstone/discord-webhook-notify@v1
with:
severity: error
details: ${{ join(steps.build.outputs.*, '\n') }}
username: Octocat
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}