forked from mempool/mempool
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Main merge master bug cypress app non deploy key googleapis #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Dargon789
wants to merge
13
commits into
master
Choose a base branch
from
main
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bad6c05
Merge branch 'mempool:master' into main
Dargon789 86fe3f2
Merge branch 'mempool:master' into main
Dargon789 0256618
Merge branch 'mempool:master' into main
Dargon789 429cca3
Merge branch 'mempool:master' into main
Dargon789 5adb1ce
Merge branch 'mempool:master' into main
Dargon789 94b1c98
Merge branch 'mempool:master' into main
Dargon789 676f097
Create cargo.yml (#31)
Dargon789 0f34604
Create web3_defi_gamefi.yml (#33)
Dargon789 670a7ae
Create SECURITY.md (#34)
Dargon789 3669d24
Create static.yml (#36)
Dargon789 ad92bad
Potential fix for code scanning alert no. 33: Client-side cross-site …
Dargon789 460fc59
Potential fix for code scanning alert no. 8: Workflow does not contai…
Dargon789 74432d9
Update .circleci/web3_defi_gamefi.yml
Dargon789 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| version: 2.1 | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| docker: | ||
| - image: cimg/rust:1.90.0 | ||
| steps: | ||
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - v1-cargo-{{ checksum "Cargo.lock" }} | ||
| - v1-cargo- | ||
| - run: | ||
| name: "Check formatting" | ||
| command: cargo fmt -- --check | ||
| - run: | ||
| name: "Run tests" | ||
| command: cargo test | ||
| - save_cache: | ||
| key: v1-cargo-{{ checksum "Cargo.lock" }} | ||
| paths: | ||
| - "~/.cargo/bin" | ||
| - "~/.cargo/registry/index" | ||
| - "~/.cargo/registry/cache" | ||
| - "~/.cargo/git/db" | ||
| - "target" | ||
| - run: | ||
| name: "Check formatting" | ||
| command: cargo fmt -- --check | ||
| - run: | ||
| name: "Run tests" | ||
| command: cargo test | ||
|
|
||
| workflows: | ||
| ci: | ||
| jobs: | ||
| - build-and-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Use the latest 2.1 version of CircleCI pipeline process engine. | ||
| # See: https://circleci.com/docs/configuration-reference | ||
| version: 2.1 | ||
|
|
||
| # Define a job to be invoked later in a workflow. | ||
| # See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs | ||
| jobs: | ||
| say-hello: | ||
| # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
| # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job | ||
| docker: | ||
| # Specify the version you desire here | ||
| # See: https://circleci.com/developer/images/image/cimg/base | ||
| - image: cimg/base:current | ||
|
|
||
| # Add steps to the job | ||
| # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps | ||
| steps: | ||
| # Checkout the code as the first step. | ||
| - checkout | ||
| - run: | ||
| name: "Say hello" | ||
| command: "echo Hello, World!" | ||
|
|
||
| # Orchestrate jobs using workflows | ||
| # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows | ||
| workflows: | ||
| say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. | ||
| # Inside the workflow, you define the jobs you want to run. | ||
| jobs: | ||
| - say-hello |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Use the latest 2.1 version of CircleCI pipeline process engine. | ||
| # See: https://circleci.com/docs/configuration-reference | ||
|
|
||
| version: 2.1 | ||
| executors: | ||
| my-custom-executor: | ||
| docker: | ||
| - image: cimg/base:stable | ||
| auth: | ||
| # ensure you have first added these secrets | ||
| # visit app.circleci.com/settings/project/github/Dargon789/foundry/environment-variables | ||
| username: $DOCKER_HUB_USER | ||
| password: $DOCKER_HUB_PASSWORD | ||
| jobs: | ||
| web3-defi-game-project-: | ||
|
|
||
| executor: my-custom-executor | ||
| steps: | ||
| - checkout | ||
| - run: | | ||
| echo "CircleCI job started in working directory: $(pwd)" | ||
|
|
||
| workflows: | ||
| my-custom-workflow: | ||
| jobs: | ||
| - web3-defi-game-project- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # This workflow will build a docker container, publish it to Google Container | ||
| # Registry, and deploy it to GKE when there is a push to the "master" | ||
| # branch. | ||
| # | ||
| # To configure this workflow: | ||
| # | ||
| # 1. Enable the following Google Cloud APIs: | ||
| # | ||
| # - Artifact Registry (artifactregistry.googleapis.com) | ||
| # - Google Kubernetes Engine (container.googleapis.com) | ||
| # - IAM Credentials API (iamcredentials.googleapis.com) | ||
| # | ||
| # You can learn more about enabling APIs at | ||
| # https://support.google.com/googleapi/answer/6158841. | ||
| # | ||
| # 2. Ensure that your repository contains the necessary configuration for your | ||
| # Google Kubernetes Engine cluster, including deployment.yml, | ||
| # kustomization.yml, service.yml, etc. | ||
| # | ||
| # 3. Create and configure a Workload Identity Provider for GitHub: | ||
| # https://github.com/google-github-actions/auth#preferred-direct-workload-identity-federation. | ||
| # | ||
| # Depending on how you authenticate, you will need to grant an IAM principal | ||
| # permissions on Google Cloud: | ||
| # | ||
| # - Artifact Registry Administrator (roles/artifactregistry.admin) | ||
| # - Kubernetes Engine Developer (roles/container.developer) | ||
| # | ||
| # You can learn more about setting IAM permissions at | ||
| # https://cloud.google.com/iam/docs/manage-access-other-resources | ||
| # | ||
| # 5. Change the values in the "env" block to match your values. | ||
|
|
||
| name: 'Build and Deploy to GKE' | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '"master"' | ||
|
|
||
| env: | ||
| PROJECT_ID: 'my-project' # TODO: update to your Google Cloud project ID | ||
| GAR_LOCATION: 'us-central1' # TODO: update to your region | ||
| GKE_CLUSTER: 'cluster-1' # TODO: update to your cluster name | ||
| GKE_ZONE: 'us-central1-c' # TODO: update to your cluster zone | ||
| DEPLOYMENT_NAME: 'gke-test' # TODO: update to your deployment name | ||
| REPOSITORY: 'samples' # TODO: update to your Artifact Registry docker repository name | ||
| IMAGE: 'static-site' | ||
| WORKLOAD_IDENTITY_PROVIDER: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' # TODO: update to your workload identity provider | ||
|
|
||
| jobs: | ||
| setup-build-publish-deploy: | ||
| name: 'Setup, Build, Publish, and Deploy' | ||
| runs-on: 'ubuntu-latest' | ||
| environment: 'production' | ||
|
|
||
| permissions: | ||
| contents: 'read' | ||
| id-token: 'write' | ||
|
|
||
| steps: | ||
| - name: 'Checkout' | ||
| uses: 'actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332' # actions/checkout@v4 | ||
|
|
||
| # Configure Workload Identity Federation and generate an access token. | ||
| # | ||
| # See https://github.com/google-github-actions/auth for more options, | ||
| # including authenticating via a JSON credentials file. | ||
| - id: 'auth' | ||
| name: 'Authenticate to Google Cloud' | ||
| uses: 'google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2' # google-github-actions/auth@v2 | ||
| with: | ||
| workload_identity_provider: '${{ env.WORKLOAD_IDENTITY_PROVIDER }}' | ||
|
|
||
| # Authenticate Docker to Google Cloud Artifact Registry | ||
| - name: 'Docker Auth' | ||
| uses: 'docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567' # docker/login-action@v3 | ||
| with: | ||
| username: 'oauth2accesstoken' | ||
| password: '${{ steps.auth.outputs.auth_token }}' | ||
| registry: '${{ env.GAR_LOCATION }}-docker.pkg.dev' | ||
|
|
||
| # Get the GKE credentials so we can deploy to the cluster | ||
| - name: 'Set up GKE credentials' | ||
| uses: 'google-github-actions/get-gke-credentials@6051de21ad50fbb1767bc93c11357a49082ad116' # google-github-actions/get-gke-credentials@v2 | ||
| with: | ||
| cluster_name: '${{ env.GKE_CLUSTER }}' | ||
| location: '${{ env.GKE_ZONE }}' | ||
|
|
||
| # Build the Docker image | ||
| - name: 'Build and push Docker container' | ||
| run: |- | ||
| DOCKER_TAG="${GAR_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPOSITORY}/${IMAGE}:${GITHUB_SHA}" | ||
|
|
||
| docker build \ | ||
| --tag "${DOCKER_TAG}" \ | ||
| --build-arg GITHUB_SHA="${GITHUB_SHA}" \ | ||
| --build-arg GITHUB_REF="${GITHUB_REF}" \ | ||
| . | ||
|
|
||
| docker push "${DOCKER_TAG}" | ||
|
|
||
| # Set up kustomize | ||
| - name: 'Set up Kustomize' | ||
| run: |- | ||
| curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz | ||
| chmod u+x ./kustomize | ||
|
|
||
| # Deploy the Docker image to the GKE cluster | ||
| - name: 'Deploy to GKE' | ||
| run: |- | ||
| # replacing the image name in the k8s template | ||
| ./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA | ||
| ./kustomize build . | kubectl apply -f - | ||
| kubectl rollout status deployment/$DEPLOYMENT_NAME | ||
| kubectl get services -o wide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Jekyll site CI | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build the site in the jekyll/builder container | ||
| run: | | ||
| docker run \ | ||
| -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ | ||
| jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Sample workflow for building and deploying a Jekyll site to GitHub Pages | ||
| name: Deploy Jekyll with GitHub Pages dependencies preinstalled | ||
|
|
||
| on: | ||
| # Runs on pushes targeting the default branch | ||
| push: | ||
| branches: ["main"] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Build job | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| - name: Build with Jekyll | ||
| uses: actions/jekyll-build-pages@v1 | ||
| with: | ||
| source: ./ | ||
| destination: ./_site | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
|
|
||
| # Deployment job | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.