Skip to content

Commit

Permalink
feat: copy files over from celestiaorg (#3)
Browse files Browse the repository at this point in the history
* feat: copy files over from celestiaorg

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* doc: add note about where to edit files

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* feat: remove references to celestiaorg

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* revert: changes

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* add comment

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: pointings to celestia

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

---------

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
  • Loading branch information
smuu committed May 22, 2023
1 parent 6f1fa36 commit 54e22ce
Show file tree
Hide file tree
Showing 28 changed files with 10,033 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Everything goes through the following "global owners" by default. Unless a
# later match takes precedence, these owners will be requested for review when
# someone opens a PR.

# Note that the last matching pattern takes precedence, so
# global owners are only requested if there isn't a more specific
# codeowner specified below. For this reason, the global codeowners
# are often repeated in package-level definitions.

# Global Owner(s)
* @MSevey

# .github directory owners
/.github/ @MSevey

# Specific file owners
CONTRIBUTING.md @liamsi @MSevey
SECURITY.md @liamsi @MSevey
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATES_TODO/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The directory has the `_TODO` prefix so that it isn't used. Once we have Issue Templates ready.
1 change: 1 addition & 0 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is where composite actions can live for the Rollkit Org.
30 changes: 30 additions & 0 deletions .github/actions/changes-since-last-tag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changes Since Last Tag is a useful helper that can check for changes in files
# based on various filters, such as extension and path. This is a useful tool
# when thinking about CI/CD to ensure we are not creating release with no diff.
name: "Changes Since Last Tag"
description: "Check for changes to any of the files since the last tag"
inputs:
working-directory:
required: false
description: "Working directory"
default: "."

# Define action steps
runs:
using: "composite"
steps:
- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
# NOTE: There is one bug when running this with no previous versions. As
# soon as one version exists, it works as expected.
fallback: 0.0.1 # Optional fallback tag to use when no tag can be found
# Use paths-filter to determine which paths have changes
# https://github.com/dorny/paths-filter
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ steps.previoustag.outputs.tag }}
filters: |
any: "**"
50 changes: 50 additions & 0 deletions .github/actions/docker-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Publish Image to Docker Hub"
description: |
Build and push the latest docker image to docker hub.
Four images will be pushed, `latest` and three semver images.
One will be the full semver image (major.minor.patch).
The second will be the major.minor version.
Third one will be just the major version.
inputs:
docker_username:
required: true
description: "secrets.DOCKER_USERNAME"
docker_password:
required: true
description: "secrets.DOCKER_PASSWORD"
docker_repository:
required: true
description: "name of the docker repository"
semver_version:
required: true
description: "The semver version to release (vX.X.X)"

# Define action steps
runs:
using: "composite"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}

- name: Generate Docker Versions
id: docker_version
uses: SkynetLabs/.github/.github/actions/major-minor-version@master
with:
version: ${{ inputs.semver_version }}
docker_repository: ${{ inputs.docker_repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: |
${{ steps.docker_version.outputs.latest_image_tag }}
${{ steps.docker_version.outputs.semver_version_image_tag }}
${{ steps.docker_version.outputs.major_minor_version_image_tag }}
${{ steps.docker_version.outputs.major_version_image_tag }}
1 change: 1 addition & 0 deletions .github/actions/major-minor-version/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions .github/actions/major-minor-version/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Developing

Install dependencies
```
npm install
```

Build new action
```
npm run build
```
24 changes: 24 additions & 0 deletions .github/actions/major-minor-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Docker Image Versions"
description: |
Generate image version tags for docker images by removing the `v` prefix and
returning major, minor and patch versions along with a latest tag.
inputs:
docker_repository:
description: "Docker Repository"
required: true
version:
description: "Semver version vX.X.X"
required: true
outputs:
latest_image_tag:
description: "The latest docker image tag"
major_version_image_tag:
description: "The major semver docker image version tag X"
major_minor_version_image_tag:
description: "The major minor semver docker image version tag X.X"
semver_version_image_tag:
description: "The semver docker image version tag X.X.X"

runs:
using: "node16"
main: "dist/index.js"
Loading

0 comments on commit 54e22ce

Please sign in to comment.