Skip to content

Commit

Permalink
Merge pull request #1 from kutovoys/production
Browse files Browse the repository at this point in the history
  • Loading branch information
sm1ky authored Sep 8, 2024
2 parents 86cf907 + eb4ea4b commit a6ade09
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Docker images

on:
push:
branches:
- production
- development

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/marzban-node-monitor:${{ steps.vars.outputs.sha_short }}
${{ secrets.DOCKERHUB_USERNAME }}/marzban-node-monitor:${{ github.ref_name == 'production' && 'latest' || github.ref_name == 'development' && 'dev' }}
27 changes: 27 additions & 0 deletions .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update Docker Hub Description
on:
push:
branches:
- main
paths:
- README.md
- README_ru.md
- README_en.md
- .github/workflows/dockerhub-description.yml
jobs:
PushContainerReadme:
runs-on: ubuntu-latest
name: Push README to Docker Hub
steps:
- name: git checkout
uses: actions/checkout@v2
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/marzban-node-monitor
provider: dockerhub
short_description: "Marzban node monitor"
readme_file: "README.md"
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ networks:

services:
marzban-monitor:
build:
context: .
dockerfile: Dockerfile
image: __sm1ky__/marzban-node-monitor:latest
env_file: .env
restart: unless-stopped
networks:
Expand Down

0 comments on commit a6ade09

Please sign in to comment.