-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Development & CI Improvements * fix build on Windows * Update Dockerfile * Update dev-env.Dockerfile * fix indent * rename * refactor env command * upgrade go in ci * Update image.yml * split docs ci into 2 workflows * fix * Revert "fix" This reverts commit ec4833d. * Revert "split docs ci into 2 workflows" This reverts commit bb317bc. * only build docs when necessary * fix badges Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
- Loading branch information
Showing
24 changed files
with
544 additions
and
325 deletions.
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,62 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
paths: | ||
- docs/** | ||
- .github/workflows/docs.yml | ||
- tasks/docs.py | ||
- mkdocs.yml | ||
- tox.ini | ||
pull_request: | ||
paths: | ||
- docs/** | ||
- .github/workflows/docs.yml | ||
- tasks/docs.py | ||
- mkdocs.yml | ||
- tox.ini | ||
|
||
jobs: | ||
build: | ||
name: Build Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --upgrade -r requirements.txt | ||
- name: Build docs | ||
run: | | ||
invoke docs.build | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: Documentation | ||
path: site | ||
|
||
publish: | ||
name: Publish Docs | ||
runs-on: ubuntu-latest | ||
# Only publish master | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: | ||
- build | ||
steps: | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: Documentation | ||
path: site | ||
|
||
- name: Publish generated content to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site |
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,142 @@ | ||
name: Image | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_driver: | ||
name: Build Driver | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 50 | ||
|
||
- name: Fetch Tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.13.6 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --upgrade -r requirements.txt | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Build Driver | ||
run: | | ||
invoke build --release | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: Driver | ||
path: bin | ||
|
||
build_container: | ||
name: Build Docker Container | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build_driver | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 50 | ||
|
||
- name: Fetch Tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.3 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --upgrade -r requirements.txt | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: Driver | ||
path: bin | ||
|
||
- name: Make Driver executable | ||
run: "chmod +x bin/*" | ||
|
||
- name: Build Docker Container | ||
run: | | ||
invoke image --release --compress | ||
- name: Package Container | ||
run: | | ||
TAG=$(git describe --long --tags --match='v*' --dirty) | ||
docker save -o ./container.tar.gz ofekmeister/csi-gcs:$TAG | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: Container | ||
path: ./container.tar.gz | ||
|
||
publish_container: | ||
name: Publish Container | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build_container | ||
# Only Publish Images from our repository, not for MR | ||
if: github.event_name == 'push' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 50 | ||
|
||
- name: Fetch Tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --upgrade -r requirements.txt | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: Container | ||
path: . | ||
|
||
- name: Import Container | ||
run: | | ||
TAG=$(git describe --long --tags --match='v*' --dirty) | ||
docker import ./container.tar.gz ofekmeister/csi-gcs:$TAG | ||
- name: Login to Docker.io | ||
run: | | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DockerUsername }} | ||
DOCKER_PASSWORD: ${{ secrets.DockerPassword }} | ||
|
||
- name: Publish Docker Container | ||
run: | | ||
invoke image.deploy |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -24,3 +24,7 @@ | |
# Test Service Account | ||
/service-account.json | ||
/test/secret.yaml | ||
|
||
# Artifacts | ||
/bin/* | ||
!/bin/.gitkeep |
Oops, something went wrong.