-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ethereum/discv4-crawl into skylen…
…et/add-status-metric
- Loading branch information
Showing
11 changed files
with
216 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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,64 @@ | ||
|
||
name: docker-deploy-image | ||
|
||
inputs: | ||
registry: | ||
description: 'The registry to push the image to' | ||
required: false | ||
default: '' | ||
registry_username: | ||
description: 'The username to use to push the image' | ||
required: false | ||
default: '' | ||
registry_password: | ||
description: 'The password to use to push the image' | ||
required: false | ||
default: '' | ||
image_name: | ||
description: 'The name of the image to push' | ||
required: false | ||
default: '' | ||
platforms: | ||
description: 'The platforms to build the image for' | ||
required: false | ||
default: 'linux/amd64,linux/arm64' | ||
push: | ||
description: 'Whether to push the image' | ||
required: false | ||
default: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | ||
|
||
- name: Log in to the Container registry | ||
if: ${{ inputs.push == true || inputs.push == 'true' }} | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | ||
with: | ||
registry: ${{ inputs.registry }} | ||
username: ${{ inputs.registry_username }} | ||
password: ${{ inputs.registry_password }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1 | ||
with: | ||
images: ${{ inputs.registry }}/${{ inputs.image_name }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=pep440,pattern={{version}} | ||
type=ref,event=branch | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 | ||
with: | ||
context: . | ||
push: ${{ inputs.push }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: ${{ inputs.platforms }} |
This file contains 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,25 @@ | ||
name: docker-build-image | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: "docker-build-${{ github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Build docker images | ||
uses: ./.github/actions/docker-deploy | ||
with: | ||
image_name: ${{ github.repository }} | ||
push: false |
This file contains 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,27 @@ | ||
name: docker-deploy-branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Deploy docker images | ||
uses: ./.github/actions/docker-deploy | ||
with: | ||
registry: ghcr.io | ||
registry_username: ${{ github.actor }} | ||
registry_password: ${{ secrets.GITHUB_TOKEN }} | ||
image_name: ${{ github.repository }} | ||
push: true |
This file contains 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,27 @@ | ||
name: docker-deploy-tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Deploy docker images | ||
uses: ./.github/actions/docker-deploy | ||
with: | ||
registry: ghcr.io | ||
registry_username: ${{ github.actor }} | ||
registry_password: ${{ secrets.GITHUB_TOKEN }} | ||
image_name: ${{ github.repository }} | ||
push: true |
This file contains 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,28 @@ | ||
name: pr-title-checker | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
merge_group: | ||
|
||
concurrency: | ||
group: "title-checker-${{ github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
pr_title_checker: | ||
name: validate | ||
# Skip merge-queue PRs | ||
if: contains(github.ref_name, 'gh-readonly-queue/main/') != true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,20 @@ | ||
name: release-please | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: googleapis/release-please-action@d1a8f221d7723166f48a584aebba00ef3f6febec | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} # Should be changed to a PAT, so that we can trigger a workflow on tag push from the CI | ||
config-file: release-please-config.json | ||
manifest-file: .release-please-manifest.json |
This file contains 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,3 @@ | ||
{ | ||
".": "0.0.1" | ||
} |
Empty file.
This file contains 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 |
---|---|---|
|
@@ -18,13 +18,11 @@ This repository contains the scripts used to automatically generate the list of | |
|
||
## Running with docker | ||
|
||
|
||
|
||
### Environment variables | ||
|
||
Name | Default | Description | ||
-----| ------- | ------- | ||
`CRAWL_GIT_REPO` | `https://github.com/skylenet/discv4-dns-lists.git` | Git repository `used to clone and push the node list | ||
`CRAWL_GIT_REPO` | `https://github.com/ethereum/discv4-dns-lists.git` | Git repository `used to clone and push the node list | ||
`CRAWL_GIT_BRANCH` | `master` | Git branch used for the fetch and push | ||
`CRAWL_GIT_PUSH` | `false` | When set to `true`, it will push the node lists to the git repository | ||
`CRAWL_GIT_USER` | `crawler` | Git username. Will appear in the commit messages. | ||
|
@@ -64,7 +62,13 @@ $ docker run -it \ | |
-v "$HOME/.ssh/crawler:/root/.ssh" \ # Needed if you use git via SSH | ||
-v "$HOME/secrets/secret-signing-key.json:/secrets/key.json" \ # Only needed if you want to sign the node lists | ||
-e CRAWL_TIMEOUT=10m \ # Specify your custom timeout | ||
-e [email protected]:skylenet/discv4-dns-lists.git \ # Use SSH instead of HTTPS | ||
-e [email protected]:ethereum/discv4-dns-lists.git \ # Use SSH instead of HTTPS | ||
-e CRAWL_GIT_PUSH=true \ # Specify that we want to push the changes | ||
skylenet/discv4-crawl | ||
ghcr.io/ethereum/discv4-crawl:master | ||
``` | ||
|
||
## Development | ||
|
||
|
||
### Contributing with a Pull Request | ||
This repository uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages, so that we can automatically generate release and the respective changelog. Make sure to follow the specification on the PR title. |
This file contains 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,12 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"release-type": "simple", | ||
"include-v-in-tag": false, | ||
"include-component-in-tag": false, | ||
"bump-minor-pre-major": true, | ||
"packages": { | ||
".": { | ||
"package-name": "discv4-crawl" | ||
} | ||
} | ||
} |
This file contains 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 @@ | ||
0.0.1 |