Skip to content

Bump actions/cache from 3.3.1 to 3.3.2 #505

Bump actions/cache from 3.3.1 to 3.3.2

Bump actions/cache from 3.3.1 to 3.3.2 #505

Workflow file for this run

name: Static Build
on:
push:
branches:
- main
- release-*
tags:
# YYYYMMDD
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*"
schedule:
- cron: "0 0 * * 1"
pull_request:
workflow_dispatch:
jobs:
static-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
# If PR is from a non-collaborator (e. g. dependabot) the secrets are missing and the login to cachix fails.
continue-on-error: true
with:
name: espresso-systems-private
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- name: Cache cargo
uses: actions/[email protected]
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
target
key: espresso-sequencer-static-v4-${{ hashFiles('Cargo.lock') }}
- name: Fix Git Security Issue
run: git config --global --add safe.directory "$PWD"
- name: Compile all executables
# timeout-minutes: 120
run: |
nix develop .#crossShell --accept-flake-config --option sandbox relaxed -c cargo build --release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-musl-services
path: |
target/x86_64-unknown-linux-musl/release/polygon-zkevm-adaptor
target/x86_64-unknown-linux-musl/release/faucet
static-dockers:
runs-on: ubuntu-latest
needs: static-build
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Download executables
uses: actions/download-artifact@v3
with:
name: x86_64-unknown-linux-musl-services
path: target/x86_64-unknown-linux-musl/release
- name: Setup Docker BuildKit (buildx)
uses: docker/setup-buildx-action@v2
- name: Login to Github Container Repo
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate polygon-zkevm-adaptor docker metadata
uses: docker/metadata-action@v4
id: polygon-zkevm-adaptor
with:
images: ghcr.io/espressosystems/espresso-polygon-zkevm-demo/polygon-zkevm-adaptor
- name: Build and push polygon-zkevm-adaptor docker
uses: docker/build-push-action@v4
with:
context: ./
file: ./docker/polygon-zkevm-adaptor.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.polygon-zkevm-adaptor.outputs.tags }}
labels: ${{ steps.polygon-zkevm-adaptor.outputs.labels }}
- name: Generate faucet docker metadata
uses: docker/metadata-action@v4
id: faucet
with:
images: ghcr.io/espressosystems/espresso-polygon-zkevm-demo/faucet
- name: Build and push faucet docker
uses: docker/build-push-action@v4
with:
context: ./
file: ./docker/faucet.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.faucet.outputs.tags }}
labels: ${{ steps.faucet.outputs.labels }}