Skip to content

Commit 97bfd95

Browse files
authored
Merge pull request #314 from prometheus-community/repo_sync
Synchronize common files from prometheus/prometheus
2 parents 289a5e3 + e153d68 commit 97bfd95

File tree

1 file changed

+57
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)