Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ updates:
pull-request-branch-name:
separator: "-"
reviewers:
- "lazartravica"
- "Kourin1996"
- "zivkovicmilos"
- "0xPolygon/core-edge"
21 changes: 16 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@ name: Build
on: # yamllint disable-line rule:truthy
workflow_dispatch:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
workflow_output:
description: "Build output"
value: ${{ jobs.go_build.outputs.build_output_failure }}

jobs:
go_build:
name: Polygon Edge
runs-on: ubuntu-latest
outputs:
build_output_failure: ${{ steps.edge_build_failure.outputs.build_output }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive


- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.20.x

- name: Build Polygon Edge
run: go build -tags netgo -ldflags="-s -w -linkmode external -extldflags "-static" -X \"github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/0xPolygon/polygon-edge/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf polygon-edge.tar.gz polygon-edge
Expand All @@ -27,6 +32,11 @@ jobs:
GOARC: amd64
GOOS: linux

- name: Build Polygon Edge Failed
if: failure()
id: edge_build_failure
run: echo "build_output=false" >> $GITHUB_OUTPUT

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
Expand All @@ -41,10 +51,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.20.x

- name: 'Reproduce builds'
continue-on-error: true
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/deploy.devnet.eph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,6 @@ jobs:
name: Build
uses: ./.github/workflows/build.yml

test:
name: Test
uses: ./.github/workflows/test.yml
needs: build
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

container_image_build:
name: Build/Push Container Image
runs-on: ubuntu-latest
environment: devnet-ephemeral
needs: build
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Download Polygon Edge Artifact
uses: actions/download-artifact@v3
with:
name: polygon-edge
- run: tar -xvzf polygon-edge.tar.gz

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: library/polygon-edge
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $REGISTRY/$REPOSITORY:devnet-ephemeral -t $REGISTRY/$REPOSITORY:$IMAGE_TAG -f Dockerfile.release .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
docker push $REGISTRY/$REPOSITORY:devnet-ephemeral

deploy_eph_devnet:
name: Deploy Ephemeral DevNet
needs: build
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/deploy.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,6 @@ jobs:
name: Build
uses: ./.github/workflows/build.yml

test:
name: Test
uses: ./.github/workflows/test.yml
needs: build
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

container_image_build:
name: Build/Push Container Image
runs-on: ubuntu-latest
environment: devnet
needs: build
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Download Polygon Edge Artifact
uses: actions/download-artifact@v3
with:
name: polygon-edge
- run: tar -xvzf polygon-edge.tar.gz

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: library/polygon-edge
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $REGISTRY/$REPOSITORY:devnet -t $REGISTRY/$REPOSITORY:$IMAGE_TAG -f Dockerfile.release .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
docker push $REGISTRY/$REPOSITORY:devnet

deploy_devnet:
name: Deploy DevNet
needs: build
Expand Down
Loading