Skip to content

Commit

Permalink
Remove the release to dockerhub, only releasing to ghcr.io from now on
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Mar 4, 2024
1 parent f02eb63 commit 6d76170
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
- name: Login to container registries
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u philipssoftware --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io
- name: Set release variables
Expand Down Expand Up @@ -127,7 +126,6 @@ jobs:
- name: Logout from container registries
if: ${{ always() }}
run: |
docker logout
docker logout ghcr.io
- name: Cleanup signing keys
Expand Down Expand Up @@ -207,7 +205,6 @@ jobs:
- name: Login to Container registries
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u philipssoftware --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io
- name: Attach provenance to image
Expand All @@ -225,6 +222,5 @@ jobs:
- name: Logout from Container registries
if: ${{ always() }}
run: |
docker logout
docker logout ghcr.io
rm -f cosign.key
2 changes: 0 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ dockers:
- goos: linux
goarch: amd64
image_templates:
- "philipssoftware/{{ .ProjectName }}:v{{ .Version }}"
- "philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}"
- "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}"
build_flag_templates:
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ LDFLAGS="-X $(PKG).GitVersion=$(GIT_VERSION) -X $(PKG).gitCommit=$(GIT_HASH) -X
GO_BUILD_FLAGS := -trimpath -ldflags $(LDFLAGS)
COMMANDS := spiffe-vault

HUB_REPO := philipssoftware/spiffe-vault
GHCR_REPO := ghcr.io/philips-labs/spiffe-vault

.PHONY: help
Expand All @@ -43,8 +42,6 @@ build: $(addprefix bin/,$(COMMANDS)) ## builds binaries
.PHONY: image
image: ## build the binary in a docker image
docker build \
-t "$(HUB_REPO):$(GIT_TAG)" \
-t "$(HUB_REPO):$(GIT_HASH)" \
-t "$(GHCR_REPO):$(GIT_TAG)" \
-t "$(GHCR_REPO):$(GIT_HASH)" \
.
Expand Down
2 changes: 1 addition & 1 deletion charts/spiffe-vault/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vault:
address: http://vault-internal.vault-system:8200

image:
repository: philipssoftware/spiffe-vault
repository: "ghcr.io/philips-labs/spiffe-vault
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ terraform apply -auto-approve

Within kubernetes our Spire Helm chart also deploys the [spire-k8s-workload-registrar][spire-k8s-workload-registrar]. This Spire component takes care of registering workloads/pods with the Spire server. Once a workload is registered with the Spire Server it will be given a SPIFFE ID.

In `k8s/spiffe-vault.yaml` we defined we want to use the `philipssoftware/spiffe-vault-cosign` image that adds the [Cosign][cosign] binary in the image as well. So we can also play with cosign later in this example.
In `k8s/spiffe-vault.yaml` we defined we want to use the `ghcr.io/philips-labs/spiffe-vault-cosign` image that adds the [Cosign][cosign] binary in the image as well. So we can also play with cosign later in this example.

Let's build this custom build now and then deploy our workload to Kubernetes.

```bash
# from the example folder
docker build -t philipssoftware/spiffe-vault-cosign:latest spiffe-vault-cosign
docker build -t ghcr.io/philips-labs/spiffe-vault-cosign:latest spiffe-vault-cosign
helm -n my-app upgrade my-app ../charts/spiffe-vault --create-namespace --install -f k8s/spiffe-vault.yaml
```

Expand Down
2 changes: 1 addition & 1 deletion example/k8s/spiffe-vault.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image:
repository: philipssoftware/spiffe-vault-cosign
repository: ghcr.io/philips-labs/spiffe-vault-cosign
tag: latest

docker:
Expand Down
2 changes: 1 addition & 1 deletion example/spiffe-vault-cosign/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM philipssoftware/spiffe-vault:v0.5.0
FROM ghcr.io/philips-labs/spiffe-vault:v0.5.0
LABEL maintainer="[email protected]"
ENV DOCKER_CERT_PATH=/certs/client
COPY --from=docker:20.10.21-alpine3.16 /usr/local/bin/docker /usr/local/bin/docker
Expand Down

0 comments on commit 6d76170

Please sign in to comment.