netbox-zabbix-sync/.github/workflows/publish-image.yml
2024-03-08 22:53:34 +01:00

18 lines
543 B
YAML

name: Publish Docker image to GHCR
on:
push
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GHCR.io
run: echo "${{ secrets.GHCR_PAT }}" | docker login --username ${{ secrets.GHCR_USER }} --password-stdin ghcr.io
- name: Build and tag image
run: docker build . -t ghcr.io/${{ secrets.GHCR_USER }}/netbox-zabbix-sync:latest
- name: Push image to GHCR.io
run: docker push ghcr.io/${{ secrets.GHCR_USER }}/netbox-zabbix-sync:latest