Skip to content

Commit

Permalink
ci(core): lint github actions files. (#1391)
Browse files Browse the repository at this point in the history
**Motivation**
Catch issues on our github actions files

**Description**
- Adds worflow to lint github actions files.
  • Loading branch information
mpaulucci authored Dec 3, 2024
1 parent 5162ffb commit 2944de1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci_gha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Github Actions
on:
pull_request:
branches:
- main
paths:
".github/**.yaml"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: actionlint
uses: raven-actions/actionlint@v2
with:
flags: "-ignore SC2086 -ignore SC2006"
6 changes: 3 additions & 3 deletions .github/workflows/ci_l1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -176,15 +176,15 @@ jobs:
docker load --input /tmp/ethrex_image.tar
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5

- name: Setup Hive
run: make setup-hive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
# Generates the tags and labels based on the image name. The id allows using it in the next step.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Pushes to ghcr.io/ethrex
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hive_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
docker tag ghcr.io/lambdaclass/ethrex:latest ethrex:latest
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5

- name: Setup Hive
run: make setup-hive
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/loc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Restore cache
id: cache-loc-report
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: loc_report.json
key: loc-report-${{ github.ref_name }}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Save new loc_report.json to cache
if: success()
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: loc_report.json
key: loc-report-${{ github.ref_name }}
Expand Down

0 comments on commit 2944de1

Please sign in to comment.