Skip to content

Commit a833140

Browse files
committed
Ci: change image name and registry setting
1 parent 78ccc70 commit a833140

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,30 @@ jobs:
1818
run: |
1919
make build-app
2020
21-
- name: Set up Docker daemon to using HTTP
22-
run: |
23-
sudo mkdir -p /etc/docker
24-
echo '{"insecure-registries":["${{ secrets.HARBOR_REGISTRY }}"]}' | sudo tee /etc/docker/daemon.json
25-
sudo systemctl restart docker
26-
27-
- name: Login to Harbor
21+
- name: Login to registry
2822
uses: docker/login-action@v2
2923
with:
30-
registry: ${{ secrets.HARBOR_REGISTRY }}
31-
username: ${{ secrets.HARBOR_USERNAME }}
32-
password: ${{ secrets.HARBOR_PASSWORD }}
33-
34-
- name: Push Docker image to Harbor
24+
registry: registry.goboolean.io
25+
username: ${{ secrets.REGISTRY_USERNAME }}
26+
password: ${{ secrets.REGISTRY_PASSWORD }}
27+
28+
- name: Push docker image to registry
3529
run: |
36-
docker tag fetch-system-worker:latest ${{ secrets.HARBOR_REGISTRY }}/fetch-system/fetch-system-worker:${{ github.sha }}
37-
docker push ${{ secrets.HARBOR_REGISTRY }}/fetch-system/fetch-system-worker:${{ github.sha }}
30+
docker tag fetch-system/worker:latest registry.goboolean.io/fetch-system/worker:${GITHUB_SHA::7}
31+
docker push registry.goboolean.io/fetch-system/worker:${GITHUB_SHA::7}
3832
3933
kustomize:
4034
runs-on: ubuntu-latest
4135
needs: build
42-
43-
# Kustomize repository update workflow
4436
steps:
45-
- name: Checkout
46-
uses: actions/checkout@v2
37+
- name: Extract image tag
38+
run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
39+
40+
- name: Update image tag
41+
uses: goboolean/manifests/.github/actions/update-image-tag@main
42+
with:
43+
app-name: ${{ github.event.repository.name }}
44+
image-tag: ${{ env.SHORT_SHA }}
45+
github-token: ${{ secrets.GOBOOLEAN_IO_TOKEN }}
46+
profile: dev
47+
pull-request-link: ${{ github.event.pull_request.html_url }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test-app:
33
@docker compose -f ./deploy/docker-compose.test.yml down
44

55
build-app:
6-
docker build -t fetch-system-worker:latest -f ./deploy/Dockerfile .
6+
docker build -t fetch-system/worker:latest -f ./deploy/Dockerfile .
77

88
generate-wire:
99
wire cmd/wire/wire_setup.go

0 commit comments

Comments
 (0)