Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): publish mkdocs and Helm chart from the specified ref #861

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/mkdocs-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ name: Deploy documentation
on:
workflow_dispatch:
inputs:
version:
description: Version to be deployed
ref:
description: The branch, tag or SHA to deploy.
required: true

jobs:
deploy:
name: Deploy documentation
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checkout main
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@v2
Expand All @@ -34,4 +34,4 @@ jobs:
git config user.name "aqua-bot"
git config user.email "[email protected]"
- run: |
mike deploy --push --update-aliases ${{ github.event.inputs.version }} latest
mike deploy --push --update-aliases ${{ github.event.inputs.ref }} latest
10 changes: 7 additions & 3 deletions .github/workflows/publish-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ name: Publish Helm chart

on:
workflow_dispatch:
inputs:
ref:
description: The branch, tag or SHA to publish.
required: true
env:
HELM_REP: helm-charts
GH_OWNER: aquasecurity
Expand All @@ -16,15 +20,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
uses: actions/checkout@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielpacak using the SHA commit, is not a good practice anymore?

Copy link
Contributor Author

@danielpacak danielpacak Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can trust official GitHub Actions to some extent. When I mentioned SHA some time back I was more concerned about GitHub Actions which are not very actively developed or are maintained by individuals, e.g. rajatjindal/krew-release-bot or dmnemec/copy_file_to_another_repo_action

with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
with:
version: v3.5.0
- name: Set up python
uses: actions/setup-python@0066b88440aa9562be742e2c60ee750fc57d8849 # v2.3.0
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Setup Chart Linting
Expand All @@ -42,7 +47,6 @@ jobs:
wget https://github.com/helm/chart-releaser/releases/download/v1.3.0/chart-releaser_1.3.0_linux_amd64.tar.gz
echo "baed2315a9bb799efb71d512c5198a2a3b8dcd139d7f22f878777cffcd649a37 chart-releaser_1.3.0_linux_amd64.tar.gz" | sha256sum -c -
tar xzvf chart-releaser_1.3.0_linux_amd64.tar.gz cr

- name: Package helm chart
run: |
./cr package ${{ env.CHART_DIR }}
Expand Down