mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-08 15:13:50 -05:00
[Fix] Explicitly set commit tags from git commits to 7 characters for deterministic CI (#1039)
* fix commit tags from git commits to 7 characters for determinism * empty * empty
This commit is contained in:
@@ -74,9 +74,9 @@ runs:
|
||||
run: |
|
||||
# For PR, GITHUB_SHA is NOT the last commit pushed onto the PR branch - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "commithash=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT
|
||||
echo "commithash=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "commithash=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
|
||||
echo "commithash=$(git rev-parse --short=7 $GITHUB_SHA)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: set docker tag
|
||||
|
||||
2
.github/workflows/codecov-external-pr.yml
vendored
2
.github/workflows/codecov-external-pr.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
# Note that we cannot use GITHUB_SHA here because it will always reference the head of main branch
|
||||
# Since we intend for this workflow to run only for PRs from an external fork, we want COMMIT_TAG to match the PR branch head
|
||||
run: |
|
||||
echo "COMMIT_TAG=$(git rev-parse --short ${{ github.event.workflow_run.head_sha }})" >> $GITHUB_OUTPUT
|
||||
echo "COMMIT_TAG=$(git rev-parse --short=7 ${{ github.event.workflow_run.head_sha }})" >> $GITHUB_OUTPUT
|
||||
- name: Show commit tag
|
||||
run: |
|
||||
echo "COMMIT_TAG: ${{ steps.compute-commit-tag.outputs.COMMIT_TAG }}"
|
||||
|
||||
@@ -32,11 +32,11 @@ jobs:
|
||||
run: |
|
||||
# For PR, GITHUB_SHA is NOT the last commit pushed onto the PR branch - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "COMMIT_TAG=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT
|
||||
echo "COMMIT_TAG=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "COMMIT_TAG=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
|
||||
echo "COMMIT_TAG=$(git rev-parse --short=7 $GITHUB_SHA)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo LAST_COMMIT_TAG=$(git rev-parse --short "${{ env.EVENT_BEFORE }}") >> $GITHUB_OUTPUT
|
||||
echo LAST_COMMIT_TAG=$(git rev-parse --short=7 "${{ env.EVENT_BEFORE }}") >> $GITHUB_OUTPUT
|
||||
echo DEVELOP_TAG=develop >> $GITHUB_OUTPUT
|
||||
- name: Show version tags
|
||||
id: step2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
SHELL := /usr/bin/env bash
|
||||
CORSET_ROOT := $(shell pwd)/../go-corset
|
||||
|
||||
VERSION := $(shell git rev-parse --short HEAD)
|
||||
VERSION := $(shell git rev-parse --short=7 HEAD)
|
||||
|
||||
LINUX_AMD64_FLAGS := CGO_ENABLED=1 CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-g++" GOOS="linux" GOARCH="amd64"
|
||||
DARWIN_ARM64_FLAGS := CGO_ENABLED=1 GOOS="linux" GOARCH="arm64"
|
||||
|
||||
Reference in New Issue
Block a user