forked from prometheus-community/windows_exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize common files from prometheus/prometheus (prometheus-commu…
…nity#1453) Co-authored-by: Ben Kochie <[email protected]>
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
name: Push README to Docker Hub | ||
on: | ||
push: | ||
paths: | ||
- "README.md" | ||
- ".github/workflows/container_description.yml" | ||
branches: [ main, master ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
PushDockerHubReadme: | ||
runs-on: ubuntu-latest | ||
name: Push README to Docker Hub | ||
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks. | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
- name: Set docker hub repo name | ||
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV | ||
- name: Push README to Dockerhub | ||
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 }} | ||
readme_file: 'README.md' | ||
|
||
PushQuayIoReadme: | ||
runs-on: ubuntu-latest | ||
name: Push README to quay.io | ||
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks. | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
- name: Set quay.io org name | ||
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV | ||
- name: Set quay.io repo name | ||
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV | ||
- name: Push README to quay.io | ||
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 | ||
readme_file: 'README.md' |