Skip to content

Commit 7085018

Browse files
committed
release
1 parent 1b259c0 commit 7085018

3 files changed

Lines changed: 45 additions & 5 deletions

File tree

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
tags:
4+
- "v*"
5+
jobs:
6+
image:
7+
name: Push container image
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: docker/metadata-action@v4
12+
id: meta
13+
with:
14+
images: ghcr.io/${{ github.repository_owner }}/gitbackup-controller
15+
tags: |
16+
type=semver,pattern=v{{version}}
17+
- uses: docker/login-action@v2
18+
with:
19+
registry: ghcr.io
20+
username: ${{ github.actor }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: docker/build-push-action@v3
23+
with:
24+
context: .
25+
push: true
26+
tags: ${{ steps.meta.outputs.tags }}
27+
labels: ${{ steps.meta.outputs.labels }}
28+
release:
29+
name: Release on GitHub
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-go@v3
34+
with:
35+
go-version-file: go.mod
36+
- run: REGISTRY=ghcr.io/${{ github.repository_owner }} ./hack/dist-manifests.sh
37+
- uses: softprops/action-gh-release@v1
38+
with:
39+
files: gitbackup.yaml

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/
4747
2. Install the controller with the following command. It creates `gitbackup-system` namespace and deploys CRDs, controllers and other resources.
4848

4949
```sh
50-
# TODO(user)
51-
kubectl apply -f https://...
50+
kubectl apply -f https://github.com/ebiiim/gitbackup/releases/download/v0.1.0/gitbackup.yaml
5251
```
5352

5453
### Deploy a `Repository` resource
@@ -103,8 +102,7 @@ kubectl delete --all repos -A
103102
2. Delete the Operator.
104103

105104
```sh
106-
# TODO(user)
107-
kubectl delete -f https://...
105+
kubectl apply -f https://github.com/ebiiim/gitbackup/releases/download/v0.1.0/gitbackup.yaml
108106
```
109107

110108
## Developing

hack/dist-manifests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ PROJECT_ROOT=$(dirname "$(dirname "$SCRIPT")")
99
PROJECT_NAME=$(basename "$PROJECT_ROOT")
1010

1111
VERSION=$(git describe --tags --match "v*")
12-
IMG=$PROJECT_NAME-controller:$VERSION
12+
REGISTRY=${REGISTRY:-"localhost"}
13+
IMG=$REGISTRY/$PROJECT_NAME-controller:$VERSION
1314
DIST_FILE=gitbackup.yaml
1415

1516
cd "$PROJECT_ROOT"
1617

18+
make kustomize
19+
1720
cd config/manager && "$PROJECT_ROOT/bin/kustomize" edit set image controller="$IMG"
1821
cd "$PROJECT_ROOT" && "$PROJECT_ROOT/bin/kustomize" build config/default > $DIST_FILE

0 commit comments

Comments
 (0)