-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: π· build and push workflow (#12)
* ci: π· add push workflow * chore: π¨ Makefile target to build local image and related changes * ci: π· fix docker image tag Signed-off-by: Prashant Shahi <[email protected]>
- Loading branch information
1 parent
d712b72
commit 633fec6
Showing
4 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
image-build-and-push-signoz-collector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: benjlevesque/[email protected] | ||
id: short-sha | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
- name: Set docker tag environment | ||
run: | | ||
if [ '${{ steps.branch-name.outputs.is_tag }}' == 'true' ]; then | ||
tag="${{ steps.branch-name.outputs.tag }}" | ||
tag="${tag:1}" | ||
echo "DOCKER_TAG=$tag" >> $GITHUB_ENV | ||
else | ||
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV | ||
fi | ||
- name: Build and push docker image | ||
run: make build-and-push-signoz-collector |
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
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