-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from telekom/github-actions
Add GitHub actions
- Loading branch information
Showing
6 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: ":seedling:" | ||
labels: | ||
- "ok-to-test" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: ":seedling:" | ||
labels: | ||
- "ok-to-test" | ||
ignore: | ||
# Ignore k8s and its transitives modules as they are upgraded manually | ||
# together with controller-runtime. | ||
- dependency-name: "k8s.io/*" | ||
- dependency-name: "go.etcd.io/*" | ||
- dependency-name: "google.golang.org/grpc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: container-image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
main-image: | ||
name: build "main" image | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "^1.18" | ||
|
||
- name: Create Licenses Report | ||
run: | | ||
make licenses-report | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/telekom/das-schiff-network-operator:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Create Draft Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
draft_release: | ||
name: Create Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Set env | ||
# run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV | ||
- name: Checkout the Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "^1.18" | ||
# - name: generate release notes | ||
# run: | | ||
# make release-notes | ||
- name: Create Licenses Report | ||
run: | | ||
make licenses-report | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: out/*.* | ||
# body_path: _releasenotes/${{ env.RELEASE_TAG }}.md | ||
|
||
release_image: | ||
name: Build and Push Release Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "^1.18" | ||
|
||
- name: Create Licenses Report | ||
run: | | ||
make licenses-report | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract Metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghcr.io/telekom/das-schiff-network-operator | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
*.so | ||
*.dylib | ||
bin | ||
out | ||
testbin/* | ||
|
||
# Test binary, build with `go test -c` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Dependency Licenses | ||
|
||
{{ range . }} | ||
- {{.Name}}@{{.Version}} ([{{.LicenseName}}]({{.LicenseURL}})) | ||
{{- end }} |