-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use semver workflow action (#548)
- Loading branch information
Showing
1 changed file
with
20 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,20 @@ jobs: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Deployment of an image has been triggered" | ||
args: "Deployment of an image has been triggered: [run ${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" | ||
- uses: actions/checkout@v4 | ||
- name: Get Next Version | ||
id: semver | ||
uses: ietf-tools/semver-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
branch: master | ||
- name: Discord notification | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Semver computed next tag to be ${{ steps.semver.outputs.next }}. Current is ${{ steps.semver.outputs.current }}" | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
@@ -44,31 +56,24 @@ jobs: | |
run: pnpm install | ||
- name: Build artifacts | ||
run: pnpm build | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Bump version and push tag | ||
id: githubTagAction | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: false | ||
DRY_RUN: true | ||
- name: Discord notification | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Image has been tagged as ${{ steps.githubTagAction.outputs.new_tag }}" | ||
args: "Built application artifacts. Building images..." | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=raw,value=latest | ||
type=raw,value=${{ steps.githubTagAction.outputs.new_tag }} | ||
type=raw,value=${{ steps.semver.outputs.next }} | ||
- name: Build and push | ||
id: buildPushAction | ||
uses: docker/build-push-action@v5 | ||
|
@@ -86,4 +91,4 @@ jobs: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Image built with ID ${{ steps.buildPushAction.outputs.imageid }}" | ||
args: "Deployment of image has completed. Image ID is '${{ steps.buildPushAction.outputs.imageid }}'. This was a dry run." |