-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
3 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
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
File renamed without changes.
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,80 @@ | ||
name: 🚀 Release | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: sedaprotocol/seda-data-proxy | ||
|
||
jobs: | ||
build-and-push: | ||
name: 🐳 Build and Push Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏷️ Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=edge,branch=main | ||
- name: 🛠️ Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: 🔐 Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 🏗️ Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: .build/docker/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
create-release: | ||
name: 📦 Create GitHub Release | ||
needs: build-and-push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: 📝 Generate Changelog | ||
id: changelog | ||
uses: TriPSs/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
output-file: false | ||
skip-commit: true | ||
skip-tag: true | ||
skip-git-pull: true | ||
git-push: false | ||
|
||
- name: 🎉 Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true | ||
generateReleaseNotes: true | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 'Test' | ||
name: 🧪 Test | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
|
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,31 @@ | ||
.PHONY: build run stop up clean logs ssh | ||
|
||
# Define the docker-compose file location | ||
DOCKER_COMPOSE_FILE := .build/docker/docker-compose.yml | ||
|
||
# Build the Docker image | ||
build: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) build | ||
|
||
# Run the Docker container | ||
run: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) up | ||
|
||
# Stop the Docker container | ||
stop: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) down | ||
|
||
# Build and run the Docker container | ||
up: build run | ||
|
||
# Clean up Docker resources | ||
clean: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) down --rmi all --volumes --remove-orphans | ||
|
||
# Show logs | ||
logs: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) logs -f | ||
|
||
# SSH into the running container | ||
ssh: | ||
docker compose -f $(DOCKER_COMPOSE_FILE) exec seda-data-proxy sh |