Skip to content

Commit

Permalink
Apply gitflow to the workflows
Browse files Browse the repository at this point in the history
- Only include compiled artifact in the release
- Tag as latest the docker image pushed in this stage
  • Loading branch information
Eric-Jalal committed Feb 20, 2024
1 parent 7ee4bb7 commit 9056c94
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,33 @@ jobs:
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build release version
run: |
cmake . && make
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
build-args: GIT_COMMIT=${{ github.sha }}
tags: jerilok/cpp-build-test:latest

# This is an unofficial action and could be internilized and be recreated due to security reasons in enterprise companies.
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
artifacts: "/usr/src/app/main"

0 comments on commit 9056c94

Please sign in to comment.