Skip to content

Commit

Permalink
ci: Improves workflows. (#7)
Browse files Browse the repository at this point in the history
# What ❔

Replaces outdated ::set-output.
Removes unneeded secret.
Marks ssh public key as sensitive.
Fixes comments.
Uses ubuntu-22.04-github-hosted-16core runner for slow workflows.
<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

To correspond public repo standards.
<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->
  • Loading branch information
yorik committed Oct 13, 2023
1 parent 1267e79 commit f37897c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:

- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Login to GAR
run: |
gcloud auth configure-docker us-docker.pkg.dev -q
Expand All @@ -29,11 +30,11 @@ jobs:
id: set_version
run: |
if [[ ${{ github.ref }} =~ "refs/tags" ]]; then
echo "::set-output name=image_tag_suffix::${GITHUB_REF#refs/*/}"
echo "image_tag_suffix=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
else
sha=$(git rev-parse --short HEAD)
ts=$(date +%s%N | cut -b1-13)
echo "::set-output name=image_tag_suffix::${sha}-${ts}"
echo "image_tag_suffix=${sha}-${ts}" >> $GITHUB_OUTPUT
fi
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/load_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 16
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protobuf_conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
conformance:
runs-on: ubuntu-latest
runs-on: [ubuntu-22.04-github-hosted-16core]
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
jobs:
check-build-test:

runs-on: ubuntu-latest
runs-on: [ubuntu-22.04-github-hosted-16core]

defaults:
run:
Expand Down
6 changes: 3 additions & 3 deletions docker/localenv.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN cargo run -p tools --bin localnet_config -- --nodes=$nodes
WORKDIR /usr/src/myapp/node
RUN cargo build -p executor --release

# Create the artifacts directory
# Create the artifacts directory
WORKDIR /usr/src/myapp/node/
RUN i=0; \
while [ $i -lt $nodes ]; do \
Expand Down Expand Up @@ -57,5 +57,5 @@ RUN i=0; \
i=$(expr $i + 1); \
done

# Some rundom command
CMD ["echo", "Done"]
# Report succes
CMD ["echo", "Done"]
4 changes: 2 additions & 2 deletions infrastructure/loadtests/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

output "instance_public_ips" {
description = "Public IPs of the instances"
value = [for instance in google_compute_instance.zksync_bft_node : instance.network_interface[0].access_config[0].nat_ip]
}

output "ssh_key" {
value = tls_private_key.ssh.public_key_openssh
value = tls_private_key.ssh.public_key_openssh
sensitive = true
}

0 comments on commit f37897c

Please sign in to comment.