Skip to content

Commit d64d0cf

Browse files
authored
Update common Prometheus files (#1137)
Signed-off-by: prombot <[email protected]>
1 parent 55c9953 commit d64d0cf

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Push README to Docker Hub
3+
on:
4+
push:
5+
paths:
6+
- "README.md"
7+
- ".github/workflows/container_description.yml"
8+
branches: [ main, master ]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
PushDockerHubReadme:
15+
runs-on: ubuntu-latest
16+
name: Push README to Docker Hub
17+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
18+
steps:
19+
- name: git checkout
20+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
- name: Set docker hub repo name
22+
run: echo "DOCKER_REPO_NAME=$(make common-docker-repo-name)" >> $GITHUB_ENV
23+
- name: Push README to Dockerhub
24+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
25+
env:
26+
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
27+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
28+
with:
29+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
30+
provider: dockerhub
31+
short_description: ${{ env.DOCKER_REPO_NAME }}
32+
readme_file: 'README.md'
33+
34+
PushQuayIoReadme:
35+
runs-on: ubuntu-latest
36+
name: Push README to quay.io
37+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
38+
steps:
39+
- name: git checkout
40+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
41+
- name: Set quay.io org name
42+
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
43+
- name: Set quay.io repo name
44+
run: echo "DOCKER_REPO_NAME=$(make common-docker-repo-name)" >> $GITHUB_ENV
45+
- name: Push README to quay.io
46+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
47+
env:
48+
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
49+
with:
50+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
51+
provider: quay
52+
readme_file: 'README.md'
53+
54+
55+

0 commit comments

Comments
 (0)