Skip to content

Testing variables workflow. The value of skip_tests= #97

Testing variables workflow. The value of skip_tests=

Testing variables workflow. The value of skip_tests= #97

Workflow file for this run

name: testing-vars
run-name: |
Testing variables workflow.
The value of
skip_tests=${{ inputs.skip_tests }}
env:
APPLICATION: "erigon"
BUILDER_IMAGE: "golang:1.22-bookworm"
TARGET_BASE_IMAGE: "alpine:3.20.1"
APP_REPO: "erigontech/erigon"
CHECKOUT_REF: "main"
DOCKER_URL: "erigontech/dev22-erigon"
DOCKERHUB_REPOSITORY: "erigontech/dev-erigon"
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."
on:
pull_request:
push:
branches:
- 'main'
tags:
- v[0-9]+.[0-9]+.[0-9]+
#tags:
## only trigger on release tags:
#- 'v*.*.*'
#- 'v*.*.*-*'
workflow_dispatch:
inputs:
skip_tests:
required: false
type: boolean
default: false
description: 'Skip tests during release build'
jobs:
testing-reusable:
name: Reusable Test
uses: ./.github/workflows/testing-reusable.yml
Build:
needs: [ testing-reusable ]
runs-on: ${{ matrix.runner }}
timeout-minutes: 5
strategy:
matrix:
#runner: [ubuntu-24.04-arm, ubuntu-24.04]
runner: [ ubuntu-latest ]
steps:
- name: Login to Docker Hub
if: |
github.repository == 'erigontech/devops-testing-workflows' &&
(github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork)
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}
- name: Checkout git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'main'
- name: Test dockerhub overview update
run: |
JSON_PAYLOAD=$(jq -n --rawfile content README.md '{ "full_description": $content }')
AUTH_RESPONSE=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d '{
"identifier": "'"${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}"'",
"secret": "'"${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}"'"
}' \
https://hub.docker.com/v2/auth/token/)
# Extract the JWT (The token is stored in the 'token' field of the JSON response)
DOCKER_JWT=$(echo "${AUTH_RESPONSE}" | jq -r .access_token)
API_URL="https://hub.docker.com/v2/repositories/erigontech/dev-erigon/"
RESULT=$(curl -s -X PATCH \
-H "Authorization: Bearer ${DOCKER_JWT}" \
-H "Content-Type: application/json" \
-d "${JSON_PAYLOAD}" \
"${API_URL}")
echo "Results:\n$(echo $RESULT | jq .)"
- name: Debug output
env:
LOCAL_DEBUG1: ${{ github.ref_name == 'main' && format('{0}{1}{2}', 'Input variable skip_tests ', ' set to value ', inputs.skip_tests) || inputs.skip_tests }}
TEST_VARIABLE: "This is test string for application ${{ env.APPLICATION }} ."
run: |
echo "Comment from fork"
echo "Find dockerconf"
pwd
echo "pwd=$(pwd). HOME=${HOME}"
echo "Debug -- end find ---"
echo "Running on ARCH=$(uname -p)"
echo
echo "Env variables:"
export