mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-27 15:18:08 +00:00
Bumps [tj-actions/branch-names](https://github.com/tj-actions/branch-names) from 5.1 to 7.0.7. - [Release notes](https://github.com/tj-actions/branch-names/releases) - [Changelog](https://github.com/tj-actions/branch-names/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/branch-names/compare/v5.1...v7.0.7) --- updated-dependencies: - dependency-name: tj-actions/branch-names dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
193 lines
6.5 KiB
YAML
193 lines
6.5 KiB
YAML
name: push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
|
|
image-build-and-push-query-service:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Setup golang
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.21"
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
version: latest
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: benjlevesque/short-sha@v2.2
|
|
id: short-sha
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v7.0.7
|
|
- 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}-oss" >> $GITHUB_ENV
|
|
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
|
|
echo "DOCKER_TAG=latest-oss" >> $GITHUB_ENV
|
|
else
|
|
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}-oss" >> $GITHUB_ENV
|
|
fi
|
|
- name: Install cross-compilation tools
|
|
run: |
|
|
set -ex
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools
|
|
- name: Build and push docker image
|
|
run: make build-push-query-service
|
|
|
|
image-build-and-push-ee-query-service:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Setup golang
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.21"
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
version: latest
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: benjlevesque/short-sha@v2.2
|
|
id: short-sha
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v7.0.7
|
|
- 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
|
|
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
|
|
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
|
|
else
|
|
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
|
|
fi
|
|
- name: Install cross-compilation tools
|
|
run: |
|
|
set -ex
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools
|
|
- name: Build and push docker image
|
|
run: make build-push-ee-query-service
|
|
|
|
image-build-and-push-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
working-directory: frontend
|
|
run: yarn install
|
|
- name: Run Prettier
|
|
working-directory: frontend
|
|
run: npm run prettify
|
|
continue-on-error: true
|
|
- name: Run ESLint
|
|
working-directory: frontend
|
|
run: npm run lint
|
|
continue-on-error: true
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
version: latest
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: benjlevesque/short-sha@v2.2
|
|
id: short-sha
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v7.0.7
|
|
- 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
|
|
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
|
|
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
|
|
else
|
|
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
|
|
fi
|
|
- name: Build and push docker image
|
|
run: make build-push-frontend
|
|
|
|
image-build-and-push-frontend-ee:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Create .env file
|
|
run: |
|
|
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
|
|
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
|
|
echo 'CLARITY_PROJECT_ID="${{ secrets.CLARITY_PROJECT_ID }}"' >> frontend/.env
|
|
- name: Install dependencies
|
|
working-directory: frontend
|
|
run: yarn install
|
|
- name: Run Prettier
|
|
working-directory: frontend
|
|
run: npm run prettify
|
|
continue-on-error: true
|
|
- name: Run ESLint
|
|
working-directory: frontend
|
|
run: npm run lint
|
|
continue-on-error: true
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
version: latest
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: benjlevesque/short-sha@v2.2
|
|
id: short-sha
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v7.0.7
|
|
- 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}-ee" >> $GITHUB_ENV
|
|
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
|
|
echo "DOCKER_TAG=latest-ee" >> $GITHUB_ENV
|
|
else
|
|
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}-ee" >> $GITHUB_ENV
|
|
fi
|
|
- name: Build and push docker image
|
|
run: make build-push-frontend
|