Skip to content

Commit c95c0f6

Browse files
authored
Merge pull request #13 from smartcontractkit/feature/build-publish-release
Add standard configuration
2 parents e264326 + 3e71880 commit c95c0f6

21 files changed

+615
-313
lines changed

.devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "nix-devcontainer",
3+
"image": "ghcr.io/xtruder/nix-devcontainer:v1",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
// Inject direnv variables into VS Code terminals and tasks:
8+
"mkhl.direnv",
9+
// Add support for `.nix` files:
10+
"jnoortheen.nix-ide",
11+
// Nix language support for VS Code
12+
"bbenoist.Nix",
13+
// Add Nix linter support
14+
"kamadorueda.alejandra",
15+
// Go language support for VS Code
16+
"golang.go"
17+
]
18+
}
19+
},
20+
"overrideCommand": false,
21+
"runArgs": ["--network=host", "--security-opt", "label=disable"]
22+
}

.github/workflows/tron-gotron-sdk.yml renamed to .github/workflows/gotron-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: ./.github/actions/changes
1919
id: c
2020
with:
21-
folder: tron
21+
folder: tron/gotron-sdk
2222

2323
test:
2424
name: Unit Tests

.github/workflows/tron-integration-tests.yml renamed to .github/workflows/integration-tests.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,9 @@ concurrency:
1414
env:
1515
CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
1616
jobs:
17-
detect-changes:
18-
runs-on: ubuntu-latest
19-
outputs:
20-
found: ${{ steps.c.outputs.found }}
21-
steps:
22-
- uses: actions/checkout@v4
23-
- uses: ./.github/actions/changes
24-
id: c
25-
with:
26-
folder: tron
2717
integration_tests_docker:
2818
name: Run Docker Integration Tests
2919
runs-on: ubuntu-latest-32cores-128GB
30-
needs: [detect-changes]
31-
if: needs.detect-changes.outputs.found == 'true'
3220
environment: integration
3321
permissions:
3422
id-token: write

.github/workflows/relayer-build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: TRON - Relayer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build-check:
11+
name: Build & Unit Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
16+
17+
- name: Install Nix
18+
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31
19+
with:
20+
nix_path: nixpkgs=channel:nixos-unstable
21+
22+
- name: Run build
23+
run: |
24+
pushd relayer
25+
nix develop -c go build -v ./...
26+
27+
- name: Run tests
28+
run: |
29+
pushd relayer
30+
nix develop -c go test -v -count=1 -p=1 -tags=integration ./...
31+
build-pkgs:
32+
name: Build and package (Nix and Docker)
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Check out code
36+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
37+
38+
- name: Install Nix
39+
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31
40+
with:
41+
nix_path: nixpkgs=channel:nixos-unstable
42+
43+
- name: Run build - Nix
44+
run: nix build -v .#chainlink-tron
45+
46+
- name: Run build - Docker (via host)
47+
run: nix develop -c ./scripts/build/make-docker.sh
48+
49+
- name: Run build - Docker (via Docker builder)
50+
run: nix develop -c ./scripts/build/make-docker.sh --docker-builder

.github/workflows/relayer-publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: TRON - Relayer - Publish Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
pull_request:
10+
types: [labeled, opened, synchronize, reopened] # Trigger when a label is added
11+
12+
jobs:
13+
build-publish-docker:
14+
name: Build & Publish Docker Image
15+
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'build-publish-docker') }}
16+
permissions:
17+
contents: read
18+
id-token: write
19+
uses: smartcontractkit/.github/.github/workflows/reusable-docker-build-publish.yml@317784689643295083653d9c9d08d34d8e379a7f # 2025-05-13
20+
with:
21+
# Internal dev ECR, retention policy based on tag
22+
aws-ecr-name: chainlink-plugins-dev
23+
aws-region-ecr: us-west-2
24+
aws-region-gati: us-west-2
25+
dockerfile: scripts/build/Dockerfile.build.nix
26+
docker-build-context: .
27+
docker-build-args: |
28+
CHAINLINK_USER=chainlink
29+
COMMIT_SHA=${{ github.sha }}
30+
docker-manifest-sign: true
31+
docker-tag-custom-suffix: "-chainlink-tron"
32+
git-sha: ${{ github.sha }}
33+
github-event-name: ${{ github.event_name }}
34+
github-ref-name: ${{ github.ref_name }}
35+
github-ref-type: ${{ github.ref_type }}
36+
github-workflow-repository: ${{ github.repository }}
37+
secrets:
38+
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID_STAGING }}
39+
AWS_ROLE_PUBLISH_ARN: ${{ secrets.AWS_ROLE_PUBLISH_ARN_STAGING }}
40+
AWS_ROLE_GATI_ARN: ${{ secrets.AWS_ROLE_ARN_GATI_READONLY }}
41+
AWS_LAMBDA_GATI_URL: ${{ secrets.AWS_LAMBDA_URL_GATI }}

.github/workflows/tron-relayer.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)