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: reformat workflow yaml files #578

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
34 changes: 12 additions & 22 deletions .github/workflows/draft-new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,56 +38,46 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v3.5.2
-
name: Create release branch
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.version }}
-
name: Update changelog
- name: Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
with:
tag: ${{ github.event.inputs.version }}
-
name: Initialize mandatory git config
- name: Initialize mandatory git config
run: |
git config user.name "eclipse-tractusx-bot"
git config user.email "tractusx-bot@eclipse.org"
-
uses: ./.github/actions/setup-java
-
name: Bump version in gradle.properties
- uses: ./.github/actions/setup-java
- name: Bump version in gradle.properties
run: |-
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties
env:
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
-
name: Bump version in /charts
- name: Bump version in /charts
uses: mikefarah/yq@v4.34.1
with:
cmd: |-
find charts -name Chart.yaml -maxdepth 3 | xargs -n1 yq -i '.appVersion = "${{ github.event.inputs.version }}" | .version = "${{ github.event.inputs.version }}"'
-
name: Update Chart READMEs
- name: Update Chart READMEs
uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.10.0
options: -v ${{ github.workspace }}/charts:/helm-docs
run: |
helm-docs --log-level debug
-
name: Commit changelog and manifest files
- name: Commit changelog and manifest files
id: make-commit
run: |
git add CHANGELOG.md gradle.properties $(find charts -name Chart.yaml) $(find charts -name README.md)
git commit --message "Prepare release ${{ github.event.inputs.version }}"

echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
-
name: Push new branch
- name: Push new branch
run: git push origin release/${{ github.event.inputs.version }}
-
name: Create pull request
- name: Create pull request
uses: thomaseizinger/create-pull-request@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
70 changes: 32 additions & 38 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,41 +41,35 @@ jobs:
helm-lint:
runs-on: ubuntu-latest
steps:
##############
### Set-Up ###
##############
-
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
-
name: helm (setup)
uses: azure/setup-helm@v3.5
with:
version: v3.8.1
-
name: python (setup)
uses: actions/setup-python@v4
with:
python-version: 3.7
-
name: chart-testing (setup)
uses: helm/chart-testing-action@v2.4.0
#####################
### Chart Testing ###
#####################
-
name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
-
name: chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint \
--config ct.yaml \
--all
##############
### Set-Up ###
##############
- uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
- name: helm (setup)
uses: azure/setup-helm@v3.5
with:
version: v3.8.1
- name: python (setup)
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: chart-testing (setup)
uses: helm/chart-testing-action@v2.4.0
#####################
### Chart Testing ###
#####################
- name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint \
--config ct.yaml \
--all
4 changes: 2 additions & 2 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ name: "KICS"

on:
push:
branches: [main, releases]
branches: [ main, releases ]
pull_request:
branches: [main, releases]
branches: [ main, releases ]
workflow_dispatch:

schedule:
Expand Down
51 changes: 19 additions & 32 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,21 @@ jobs:
outputs:
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
steps:
-
name: Extract version from branch name (for release branches)
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}

echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
-
name: Extract version from branch name (for hotfix branches)
- name: Extract version from branch name (for hotfix branches)
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}

echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
-
name: Output release version
- name: Output release version
id: release-version
run: |
echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -102,12 +99,12 @@ jobs:
strategy:
fail-fast: false
matrix:
variant: [{dir: edc-controlplane, img: edc-runtime-memory},
{dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault},
{dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault},
{dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault},
{dir: edc-dataplane, img: edc-dataplane-azure-vault},
{dir: edc-dataplane, img: edc-dataplane-hashicorp-vault}]
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]

steps:
- uses: actions/checkout@v3.5.2
Expand Down Expand Up @@ -136,21 +133,17 @@ jobs:

if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
-
name: Export RELEASE_VERSION env
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
-
uses: actions/checkout@v3.5.2
- uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
-
name: Install Helm
- name: Install Helm
uses: azure/setup-helm@v3.5
with:
version: v3.8.1
-
name: Package helm, update index.yaml and push to gh-pages
- name: Package helm, update index.yaml and push to gh-pages
run: |
# Prepare git env
git config user.name "eclipse-tractusx-bot"
Expand Down Expand Up @@ -183,17 +176,14 @@ jobs:
pull-requests: write
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
-
name: Export RELEASE_VERSION env
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
-
uses: actions/checkout@v3.5.2
- uses: actions/checkout@v3.5.2
with:
# 0 to fetch the full history due to upcoming merge of releases into main branch
fetch-depth: 0
-
name: Create Release Tag
- name: Create Release Tag
id: create_release_tag
run: |
# Prepare git env
Expand All @@ -207,8 +197,7 @@ jobs:
# Create & push tag
git tag --force ${{ env.RELEASE_VERSION }}
git push --force origin ${{ env.RELEASE_VERSION }}
-
name: Create Github Release
- name: Create Github Release
id: create_release
uses: thomaseizinger/create-release@1.0.0
env:
Expand All @@ -219,10 +208,8 @@ jobs:
name: ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
-
uses: ./.github/actions/setup-java
-
name: Merge releases back into main and set new snapshot version
- uses: ./.github/actions/setup-java
- name: Merge releases back into main and set new snapshot version
if: github.event.pull_request.base.ref == 'releases'
run: |
# Prepare git env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: ./.github/actions/setup-java
- name: Download latest Eclipse Dash
run: |
curl -L https://repo.eclipse.org/service/local/artifact/maven/redirect\?r\=dash-licenses\&g\=org.eclipse.dash\&a\=org.eclipse.dash.licenses\&v\=LATEST --output dash.jar
curl -L https://repo.eclipse.org/service/local/artifact/maven/redirect\?r\=dash-licenses\&g\=org.eclipse.dash\&a\=org.eclipse.dash.licenses\&v\=LATEST --output dash.jar
- name: Regenerate DEPENDENCIES
run: |
# dash returns a nonzero exit code if there are libs that need review. the "|| true" avoids that
Expand Down