Skip to content

Commit

Permalink
Merge pull request #3 from baking-bad/actions
Browse files Browse the repository at this point in the history
GH Action
  • Loading branch information
igorsereda authored Nov 15, 2024
2 parents b932647 + 1c29d85 commit 4e7b392
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build
on:
push:
branches:
- 'master'
tags:
- '*.*.*'
pull_request:
branches:
- 'master'

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_REGISTRY: ghcr.io
DOCKER_IMAGE_NAME: ${{ github.repository }}
steps:
- name: Check out the repo
uses: actions/checkout@v2

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

- name: Log in to the registry
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Watchtower image tags & labels
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}

- name: Watchtower image build & push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

py := uv run

source_dir := .
source_dir := src


install:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Watchtower for Etherlink Bridge withdrawal operations

## Local Setup
### Prerequisites
- Install [Poetry](https://python-poetry.org/docs/#installation) if not already installed.
- Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.

### Installation
1. Install dependencies:
```bash
poetry install
make install
```

2. Copy and configure environment variables:
Expand All @@ -30,5 +30,5 @@ docker build -t etherlink-watchtower .

### Run Docker Container
```bash
docker run -d --name watchtower --env-file .env.dist etherlink-watchtower
docker run -d --name watchtower --env-file .env etherlink-watchtower
```

0 comments on commit 4e7b392

Please sign in to comment.