Skip to content

Commit acec71b

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

5 files changed

Lines changed: 30 additions & 63 deletions

File tree

.github/workflows/__shared-ci.yml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,35 @@ jobs:
7171
file: coverage.lcov
7272
allow-empty: true
7373

74+
docker-build-images:
75+
name: "Docker: Build Images"
76+
needs: [golangci-lint, go-test, go-coverage, chart-testing]
77+
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@0.15.0
78+
permissions:
79+
actions: write
80+
contents: read
81+
id-token: write
82+
issues: read
83+
packages: write
84+
pull-requests: read
85+
secrets:
86+
oci-registry-password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
87+
with:
88+
runs-on: '["self-hosted"]'
89+
oci-registry: "docker.io"
90+
oci-registry-username: ${{ vars.DOCKERHUB_REGISTRY_USERNAME }}
91+
images: |
92+
[{
93+
"name": "http-header-authenticator",
94+
"repository": "webofmars",
95+
"tag": "${{ inputs.tag }}",
96+
"dockerfile": "./Dockerfile",
97+
"platforms": [
98+
"linux/amd64",
99+
"linux/arm64"
100+
]
101+
}]
102+
74103
chart-testing:
75104
name: "Helm: Chart Testing"
76105
runs-on: self-hosted
@@ -112,30 +141,3 @@ jobs:
112141
- name: Run chart-testing (install)
113142
if: steps.list-changed.outputs.changed == 'true'
114143
run: ct install --target-branch ${{ github.event.repository.default_branch }}
115-
116-
docker-build-images:
117-
name: "Docker: Build Images"
118-
needs: [golangci-lint, go-test, go-coverage, chart-testing]
119-
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@0.15.0
120-
permissions:
121-
actions: write
122-
contents: read
123-
id-token: write
124-
issues: read
125-
packages: write
126-
pull-requests: read
127-
secrets:
128-
oci-registry-password: ${{ secrets.GITHUB_TOKEN }}
129-
with:
130-
runs-on: '["self-hosted"]'
131-
oci-registry: "ghcr.io"
132-
images: |
133-
[{
134-
"name": "app",
135-
"tag": "${{ inputs.tag }}",
136-
"dockerfile": "./Dockerfile",
137-
"platforms": [
138-
"linux/amd64",
139-
"linux/arm64"
140-
]
141-
}]

.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

.tool-versions

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
skaffold 2.8.0
21
helm 3.12.1

skaffold.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)