Skip to content

Commit 4d6a813

Browse files
committed
ghcr
1 parent 23363c0 commit 4d6a813

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,39 +73,40 @@ jobs:
7373
name: Publish master branch artifacts
7474
runs-on: ubuntu-latest
7575
needs: [test_go, build_all, verify-example-configs]
76-
if: |
77-
(github.repository == 'prometheus-community/yet-another-cloudwatch-exporter')
78-
&&
79-
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
76+
if: (github.event_name == 'push' && github.event.ref == 'refs/heads/master')
77+
permissions:
78+
packages: write
79+
attestations: write
80+
contents: read
81+
id-token: write
8082
steps:
8183
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8284
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
83-
- uses: ./.github/promci/actions/publish_main
85+
- uses: ./.github/promci/actions/restore_artifacts
86+
- uses: ./.github/promci/actions/publish_images
8487
with:
85-
docker_hub_organization: prometheuscommunity
86-
docker_hub_login: ${{ secrets.docker_hub_login }}
87-
docker_hub_password: ${{ secrets.docker_hub_password }}
88-
quay_io_organization: prometheuscommunity
89-
quay_io_login: ${{ secrets.quay_io_login }}
90-
quay_io_password: ${{ secrets.quay_io_password }}
88+
registry: ghcr.io
89+
organization: clickhouse
90+
login: ${{ github.actor }}
91+
password: ${{ secrets.GITHUB_TOKEN }}
9192

9293
publish_release:
9394
name: Publish release artifacts
9495
runs-on: ubuntu-latest
9596
needs: [test_go, build_all, verify-example-configs]
96-
if: |
97-
(github.repository == 'prometheus-community/yet-another-cloudwatch-exporter')
98-
&&
99-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v0.'))
97+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v0.'))
98+
permissions:
99+
packages: write
100+
attestations: write
101+
contents: read
102+
id-token: write
100103
steps:
101104
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
102105
- uses: prometheus/promci@443c7fc2397e946bc9f5029e313a9c3441b9b86d # v0.4.7
103-
- uses: ./.github/promci/actions/publish_release
106+
- uses: ./.github/promci/actions/restore_artifacts
107+
- uses: ./.github/promci/actions/publish_release_images
104108
with:
105-
docker_hub_organization: prometheuscommunity
106-
docker_hub_login: ${{ secrets.docker_hub_login }}
107-
docker_hub_password: ${{ secrets.docker_hub_password }}
108-
quay_io_organization: prometheuscommunity
109-
quay_io_login: ${{ secrets.quay_io_login }}
110-
quay_io_password: ${{ secrets.quay_io_password }}
111-
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}
109+
registry: ghcr.io
110+
organization: clickhouse
111+
login: ${{ github.actor }}
112+
password: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)