2024-03-12 06:13:10 -07:00
|
|
|
---
|
|
|
|
name: Push README to Docker Hub
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "README.md"
|
2024-06-04 07:25:24 -07:00
|
|
|
- "README-containers.md"
|
2024-03-12 06:13:10 -07:00
|
|
|
- ".github/workflows/container_description.yml"
|
2024-03-13 06:28:05 -07:00
|
|
|
branches: [ main, master ]
|
2024-03-12 06:13:10 -07:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
PushDockerHubReadme:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Push README to Docker Hub
|
2024-03-17 16:33:56 -07:00
|
|
|
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
|
2024-03-12 06:13:10 -07:00
|
|
|
steps:
|
|
|
|
- name: git checkout
|
2024-10-06 11:01:57 -07:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
2024-03-13 07:56:37 -07:00
|
|
|
- name: Set docker hub repo name
|
2024-03-18 22:53:10 -07:00
|
|
|
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
2024-03-13 07:56:37 -07:00
|
|
|
- name: Push README to Dockerhub
|
2024-03-12 06:13:10 -07:00
|
|
|
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
|
|
|
|
env:
|
|
|
|
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
|
|
|
|
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
|
|
with:
|
|
|
|
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
|
|
|
|
provider: dockerhub
|
|
|
|
short_description: ${{ env.DOCKER_REPO_NAME }}
|
2024-06-05 06:37:47 -07:00
|
|
|
# Empty string results in README-containers.md being pushed if it
|
|
|
|
# exists. Otherwise, README.md is pushed.
|
|
|
|
readme_file: ''
|
2024-03-12 06:13:10 -07:00
|
|
|
|
|
|
|
PushQuayIoReadme:
|
|
|
|
runs-on: ubuntu-latest
|
2024-03-14 01:20:40 -07:00
|
|
|
name: Push README to quay.io
|
2024-03-17 16:33:56 -07:00
|
|
|
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
|
2024-03-12 06:13:10 -07:00
|
|
|
steps:
|
|
|
|
- name: git checkout
|
2024-10-06 11:01:57 -07:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
2024-03-13 07:56:37 -07:00
|
|
|
- name: Set quay.io org name
|
2024-03-12 06:13:10 -07:00
|
|
|
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
|
2024-03-13 07:56:37 -07:00
|
|
|
- name: Set quay.io repo name
|
2024-03-18 22:53:10 -07:00
|
|
|
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
|
2024-03-13 07:56:37 -07:00
|
|
|
- name: Push README to quay.io
|
2024-03-12 06:13:10 -07:00
|
|
|
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
|
|
|
|
env:
|
|
|
|
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
|
|
|
|
with:
|
|
|
|
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
|
|
|
|
provider: quay
|
2024-06-05 06:37:47 -07:00
|
|
|
# Empty string results in README-containers.md being pushed if it
|
|
|
|
# exists. Otherwise, README.md is pushed.
|
|
|
|
readme_file: ''
|