Skip to content

Commit 00db14f

Browse files
committed
ci: use docker hub images directly
1 parent 2f8d723 commit 00db14f

3 files changed

Lines changed: 11 additions & 25 deletions

File tree

.github/workflows/__shared-ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
built-images:
1212
value: ${{ jobs.docker-build-images.outputs.built-images }}
1313

14+
15+
env:
16+
DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
17+
DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
18+
1419
jobs:
1520

1621
golangci-lint:
@@ -125,13 +130,15 @@ jobs:
125130
packages: write
126131
pull-requests: read
127132
secrets:
128-
oci-registry-password: ${{ secrets.GITHUB_TOKEN }}
133+
oci-registry-password: $DOCKERHUB_REGISTRY_PASSWORD
129134
with:
130135
runs-on: '["self-hosted"]'
131-
oci-registry: "ghcr.io"
136+
oci-registry: "docker.io"
137+
oci-registry-username: $DOCKERHUB_REGISTRY_USER
132138
images: |
133139
[{
134-
"name": "app",
140+
"name": "http-header-authenticator",
141+
"repository": "webofmars",
135142
"tag": "${{ inputs.tag }}",
136143
"dockerfile": "./Dockerfile",
137144
"platforms": [

.github/workflows/pull-request-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
name: Continuous Integration
2525
uses: ./.github/workflows/__shared-ci.yml
2626
permissions:
27+
actions: write
2728
contents: read
2829
id-token: write
2930
issues: read

.github/workflows/release.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,6 @@ jobs:
4343
publish: true
4444
disable-autolabeler: true
4545

46-
- uses: docker/login-action@v3
47-
with:
48-
registry: "ghcr.io"
49-
username: ${{ github.repository_owner }}
50-
password: ${{ secrets.GITHUB_TOKEN }}
51-
52-
- uses: docker/login-action@v3
53-
with:
54-
registry: "docker.io"
55-
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
56-
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
57-
58-
- name: Push built images to Docker.io
59-
run: |
60-
APP_IMAGE="${{ fromJson(needs.ci.outputs.built-images).app.images[0] }}"
61-
docker pull "$APP_IMAGE"
62-
APP_TAG="${{ steps.update_release_draft.outputs.tag_name }}"
63-
APP_REGISTRY_PATH="docker.io/webofmars"
64-
APP_DOCKERIO_IMAGE="${APP_REGISTRY_PATH}/http-header-authenticator:$APP_TAG"
65-
docker tag "$APP_IMAGE" "$APP_DOCKERIO_IMAGE"
66-
docker push "$APP_DOCKERIO_IMAGE"
67-
6846
helm-push:
6947
name: "Helm: push chart to harbor registry"
7048
needs: ci

0 commit comments

Comments
 (0)