Setup custom prometheus docker image that should be deployed to railway #1
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
name: Build Prometheus Docker image | |
on: | |
push: | |
paths: | |
- prometheus/** | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Login to container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
working-directory: ./prometheus | |
run: docker build -t ghcr.io/jirkavrba/dubs-bot/prometheus:latest . | |
- name: Push Docker image to container registry | |
run: docker push ghcr.io/jirkavrba/dubs-bot:latest |