Skip to content

Commit 4c5fbc8

Browse files
committed
adds pushrm to gitbub steps
1 parent 527c16c commit 4c5fbc8

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- development
99
paths:
10+
- .github/**
1011
- module/**
1112
- netbox-sync.py
1213
- requirements.txt
@@ -36,6 +37,14 @@ jobs:
3637
with:
3738
string: ${{ github.repository }}
3839

40+
- name: set dockerhub repo name
41+
uses: mad9000/actions-find-and-replace-string@5
42+
id: dockerhub_image
43+
with:
44+
source: ${{ steps.docker_image.outputs.lowercase }}
45+
find: 'bb-ricardo'
46+
replace: ${{ vars.DOCKER_HUB_USERNAME }}
47+
3948
- name: Log in to GitHub Container Registry
4049
uses: docker/login-action@v3
4150
with:
@@ -64,23 +73,32 @@ jobs:
6473
- name: Log in to Docker Hub
6574
uses: docker/login-action@v3
6675
with:
67-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
76+
username: ${{ vars.DOCKER_HUB_USERNAME }}
6877
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
6978

7079
- name: Docker hub meta
7180
id: meta_dhub
7281
uses: docker/metadata-action@v5
7382
with:
74-
images: docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/${{ steps.docker_image.outputs.lowercase }}
83+
images: docker.io/${{ steps.dockerhub_image.outputs.value }}
7584
tags: |
7685
type=semver,pattern={{version}}
7786
type=ref,event=branch
7887
79-
- name: Build and push with tags - ${{ steps.meta_dhub.outputs.tags }}
88+
- name: Build and push with tags - ${{ steps.dockerhub_image.outputs.value }}
8089
uses: docker/build-push-action@v6
8190
with:
8291
context: .
8392
push: true
8493
platforms: linux/amd64,linux/arm64
8594
tags: ${{ steps.meta_dhub.outputs.tags }}
8695
labels: ${{ steps.meta_dhub.outputs.labels }}
96+
97+
- name: push README to Dockerhub
98+
uses: christian-korneck/update-container-description-action@v1
99+
env:
100+
DOCKER_USER: ${{ vars.DOCKER_HUB_USERNAME }}
101+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
102+
with:
103+
destination_container_repo: ${{ steps.dockerhub_image.outputs.value }}
104+
provider: dockerhub

0 commit comments

Comments
 (0)