Skip to content

chore: docker workflow refactor #3

chore: docker workflow refactor

chore: docker workflow refactor #3

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
permissions: {}
jobs:
determine-image-tag:
name: Determine Image Tag
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
tag: ${{ steps.set-tag.outputs.tag }}
steps:
- name: Set image tag
id: set-tag
run: |
if [ -n "${{ github.event.pull_request.number }}" ]; then
TAG="pr-${{ github.event.pull_request.number }}"
echo "::notice::Using PR-based tag: $TAG"
else
# Sanitize ref_name by replacing / with -
TAG="${{ github.ref_name }}"
TAG="${TAG//\//-}"
echo "::notice::Using branch/tag-based tag: $TAG"
fi
# Validate tag format
if [[ ! "$TAG" =~ ^[a-zA-Z0-9._-]+$ ]]; then
echo "::error::Invalid image tag format: $TAG"
exit 1
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
lint:
permissions:
contents: read
uses: ./.github/workflows/lint.yml
docker:
needs: determine-image-tag
uses: ./.github/workflows/docker.yml
secrets: inherit
permissions:
contents: read
packages: write
with:
image-tag: ${{ needs.determine-image-tag.outputs.tag }}
apps: |
[
{"name": "ev-node-evm-single", "dockerfile": "apps/evm/single/Dockerfile"}
]
test:

Check failure on line 59 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 59, Col: 3): Error calling workflow 'evstack/ev-node/.github/workflows/test.yml@390d5b79c0aab866a8c81edef42c2abe375b02cb'. The nested job 'combine_and_upload_coverage' is requesting 'actions: read', but is only allowed 'actions: none'.
needs: determine-image-tag
permissions:
contents: read
uses: ./.github/workflows/test.yml
secrets: inherit
with:
image-tag: ${{ needs.determine-image-tag.outputs.tag }}
docker-tests:
needs: [determine-image-tag, docker]
uses: ./.github/workflows/docker-tests.yml
secrets: inherit
permissions:
contents: read
with:
image-tag: ${{ needs.determine-image-tag.outputs.tag }}
proto:
permissions:
contents: read
uses: ./.github/workflows/proto.yml