Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

✨ Use GitHub Container Registry #13

Merged
merged 2 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

env:
IMAGE_BASENAME: 'go-netbox-proxy'
IMAGE_BASENAME: 'riege/go-netbox-proxy'

jobs:
build:
Expand All @@ -26,15 +26,15 @@ jobs:
- name: Login to Container Registry
uses: docker/#-action@v2
with:
registry: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
registry: ${{ secrets.GHCR_LOGIN_SERVER }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PAT }}

- name: Determine Image Tags
id: tags
uses: docker/metadata-action@v4
with:
images: ${{ secrets.ACR_LOGIN_SERVER }}/${{ env.IMAGE_BASENAME }}
images: ${{ secrets.GHCR_LOGIN_SERVER }}/${{ env.IMAGE_BASENAME }}
sep-tags: ','
flavor: |
latest=false
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- v**

env:
IMAGE_BASENAME: 'go-netbox-proxy'
IMAGE_BASENAME: 'riege/go-netbox-proxy'

jobs:
build:
Expand All @@ -26,15 +26,15 @@ jobs:
- name: Login to Container Registry
uses: docker/#-action@v2
with:
registry: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
registry: ${{ secrets.GHCR_LOGIN_SERVER }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PAT }}

- name: Determine Image Tags
id: tags
uses: docker/metadata-action@v4
with:
images: ${{ secrets.ACR_LOGIN_SERVER }}/${{ env.IMAGE_BASENAME }}
images: ${{ secrets.GHCR_LOGIN_SERVER }}/${{ env.IMAGE_BASENAME }}
sep-tags: ','
flavor: |
latest=false
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w -extldflags "-st
FROM gcr.io/distroless/static:latest-amd64
COPY --from=build /go/bin/go-netbox-proxy /

LABEL org.opencontainers.image.source https://github.com/riege/go-netbox-proxy

CMD ["/go-netbox-proxy"]