Skip to content

Commit

Permalink
[OPS] ci update
Browse files Browse the repository at this point in the history
  • Loading branch information
ggfto committed Feb 7, 2024
1 parent 5c524c7 commit f9297b7
Showing 1 changed file with 60 additions and 32 deletions.
92 changes: 60 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: ci

on:
schedule:
- cron: "0 0 1 * *"
push:
branches:
- "main"
Expand All @@ -11,33 +9,63 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/mosquitto:latest
-
name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/mosquitto
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Generate Release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: minor
use_github_release_notes: true
tag_prefix: v
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ github.repository }}:latest, ${{ github.repository }}:${{steps.release.outputs.version}}
-
name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ github.repository }}
-
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}}

0 comments on commit f9297b7

Please sign in to comment.