Skip to content

Commit a1f5117

Browse files
committed
test
1 parent 2bb4971 commit a1f5117

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

.github/workflows/testing-auto-snapshots-v2.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ run-name: "Publishing snapshot images "
33

44
env:
55
APPLICATION: "erigon"
6-
#BUILDER_IMAGE: "golang:1.22-bookworm"
7-
BUILDER_IMAGE: "golang:1.22-bookworm"
8-
#BUILDER_IMAGE: "golang:1.22.7-alpine3.20"
9-
#TARGET_BASE_IMAGE: "alpine:3.20.3"
6+
BUILDER_IMAGE: "golang:1.23-bookworm"
107
TARGET_BASE_IMAGE: "debian:12.7"
118
APP_REPO: "erigontech/erigon"
12-
CHECKOUT_REF: "main"
9+
#CHECKOUT_REF: "main"
1310
DOCKERHUB_REPOSITORY: "erigontech/dev-erigon"
1411
LABEL_DESCRIPTION: "[docker image built on a last commit id from the main branch] Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."
1512

@@ -22,6 +19,12 @@ on:
2219
#- 'v*.*.*'
2320
#- 'v*.*.*-*'
2421
workflow_dispatch:
22+
inputs:
23+
checkout_ref:
24+
required: true
25+
type: string
26+
default: 'main'
27+
description: 'The branch to checkout and build artifacts from. By default "main".'
2528

2629
jobs:
2730

@@ -31,6 +34,35 @@ jobs:
3134

3235
steps:
3336

37+
- name: Define variables
38+
## Logic:
39+
## latest image: erigontech/erigon:${tag_name}${latest_suffix}
40+
## commit id image: erigontech/erigon:${tag_name}-${short_commit_id}
41+
##
42+
##
43+
run: |
44+
case ${{ inputs.checkout_ref }} in
45+
'main' )
46+
set tag_name='main';
47+
set keep_images=100;
48+
set latest_suffix='-latest'
49+
set binaries=''
50+
;;
51+
'docker_pectra' )
52+
set tag_name='docker_pectra';
53+
set keep_images=5;
54+
set latest_suffix='';
55+
* )
56+
# use last statement after last '/'
57+
set tag_name=$(echo ${{ inputs.checkout_ref }} | sed -e 's/.*\///g' );
58+
set keep_images=0;
59+
set latest_suffix='-latest'
60+
esac
61+
echo tag_name=${tag_name} >> $GITHUB_OUTPUT
62+
echo keep_images=${keep_images} >> $GITHUB_OUTPUT
63+
echo latest_suffix=${latest_suffix} >> $GITHUB_OUTPUT
64+
65+
3466
- name: Fast checkout git repository devops-testing-workflows
3567
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
3668
with:
@@ -43,7 +75,7 @@ jobs:
4375
with:
4476
repository: ${{ env.APP_REPO }}
4577
fetch-depth: 1
46-
ref: ${{ env.CHECKOUT_REF }}
78+
ref: ${{ inputs.checkout_ref }}
4779
path: 'erigon'
4880

4981
- name: Setup go (cache, etc)
@@ -64,8 +96,11 @@ jobs:
6496
echo "short_commit_id=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
6597
echo "week_of_the_year=$(/bin/date -u "+%Y-%W")" >> $GITHUB_OUTPUT
6698
cd ..
99+
echo "DEBUG: printing all env variables:"
100+
set
67101
68102
- name: Configure go build and pkg cache for one week only
103+
if: 3 > 4
69104
id: cache
70105
uses: actions/cache@v4
71106
with:

0 commit comments

Comments
 (0)