Skip to content

Commit

Permalink
pin all github action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Sep 16, 2023
1 parent 8087d93 commit 3b1d5b3
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/benchmark-auto-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4

- name: Prep build on Ubuntu
uses: ./.github/actions/prep-ubuntu
Expand All @@ -35,35 +35,37 @@ jobs:
GSA: ${{ secrets.GSA_SCCACHE }}

# - name: Checkout code
# uses: actions/checkout@v3
# uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
# with:
# ref: 'main'

- name: Run Benchmark ${{ matrix.runtimes }}
run: ./scripts/runtime_benchmarks.sh ${{ matrix.runtimes }}

- run: echo "NOW=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV

- name: Create PR with new benchmarks
uses: peter-evans/create-pull-request@v5
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
add-paths: runtime/${{ matrix.runtimes }}/src/weights/
base: main
branch: benchmarks/${{ matrix.runtimes }}-${{ env.NOW }}
delete-branch: true
reviewers: ${{ github.actor }}
draft: true
labels: gha, benchmarks
commit-message: "New benchmark weights generated from main by Github Actions Bot"
title: New benchmark weights for ${{ matrix.runtimes }}
body: |
Automated PR generated by Benchmark PR Github Actions job
Runtime: ${{ matrix.runtimes }}
Commit that triggered:
${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
# - name: Upload artifact
# uses: actions/upload-artifact@v3
name: ${{ matrix.runtimes }}-weights
path: runtime/${{ matrix.runtimes }}/src/weights/

# Disabled a the org level
# fails with 'GitHub Actions is not permitted to create or approve pull requests.'
# - name: Create PR with new benchmarks
# uses: peter-evans/create-pull-request@v5
# with:
# name: ${{ matrix.runtimes }}-weights
# path: runtime/${{ matrix.runtimes }}/src/weights/
# add-paths: runtime/${{ matrix.runtimes }}/src/weights/
# base: main
# branch: benchmarks/${{ matrix.runtimes }}-${{ env.NOW }}
# delete-branch: true
# reviewers: ${{ github.actor }}
# draft: true
# labels: gha, benchmarks
# commit-message: "New benchmark weights generated from main by Github Actions Bot"
# title: New benchmark weights for ${{ matrix.runtimes }}
# body: |
# Automated PR generated by Benchmark PR Github Actions job
# Runtime: ${{ matrix.runtimes }}
# Commit that triggered:
# ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
12 changes: 6 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
WORKFLOW_TAG: ${{ github.event.inputs.docker_tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
with:
fetch-depth: 0
- name: Free space
Expand All @@ -37,7 +37,7 @@ jobs:
df -h
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3
- name: DockerHub Login
uses: docker/login-action@v3
with:
Expand All @@ -48,7 +48,7 @@ jobs:

- name: Setup docker metadata
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 #v5
with:
images: centrifugeio/centrifuge-chain
flavor: |
Expand All @@ -64,14 +64,14 @@ jobs:
type=edge
- name: Configure sccache
uses: actions/github-script@v6
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build and push centrifugeio/centrifuge-chain
uses: docker/build-push-action@v5
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5
# env:
# BUILDKIT_PROGRESS: plain
# DOCKER_BUILDKIT: 1
Expand All @@ -94,7 +94,7 @@ jobs:

- name: Update DockerHub descriptions
if: contains(github.ref, 'refs/tags/release-v')
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 #v3.4.2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
echo "BUILD_OPTS=${{ env.BUILD_OPT }}"
- name: Run Docker SRTool
uses: addnab/docker-run-action@v3
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 #v3
env:
RUSTC_VERSION: ${{ matrix.rust_version }}
BUILD_OPTS: ${{ env.BUILD_OPTS }}
Expand All @@ -79,7 +79,7 @@ jobs:
ls -la /cargo-home/
du -sh /cargo-home/*
echo "---- RUNNING BUILD ----"
/srtool/build --json
srtool build
- id: 'auth'
# if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4

- name: Prep build on Ubuntu
uses: ./.github/actions/prep-ubuntu
Expand Down

0 comments on commit 3b1d5b3

Please sign in to comment.