mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
try a different way of publishing
This commit is contained in:
parent
3a39c314be
commit
4b7f3ec0b9
35
.github/workflows/publish-image.yml
vendored
35
.github/workflows/publish-image.yml
vendored
@ -19,10 +19,33 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Login to ghcr.io
|
||||
run: echo "${{ secrets.GHCR_PAT }}" | docker login --username ${{ github.actor }} --password-stdin ${{ env.REGISTRY }}
|
||||
- name: Build and tag image
|
||||
run: docker build . -t ${{ env.REGISTRY}}/${{ env.IMAGE_NAME }}:latest
|
||||
- name: Push image to ghcr.io
|
||||
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
# - name: Login to ghcr.io
|
||||
# run: echo "${{ secrets.GHCR_PAT }}" | docker login --username ${{ github.actor }} --password-stdin ${{ env.REGISTRY }}
|
||||
# - name: Build and tag image
|
||||
# run: docker build . -t ${{ env.REGISTRY}}/${{ env.IMAGE_NAME }}:latest
|
||||
# - name: Push image to ghcr.io
|
||||
# run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GHCR_PAT }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=semver,pattern={{ version }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user