Skip to content
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
17 changes: 7 additions & 10 deletions .github/actions/hugo-build-action/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,31 @@ runs:
using: "composite"
steps:
- name: "Setup GO"
uses: actions/setup-go@v6
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: '>=1.20.1'
cache: false
- name: "Cache Go modules"
uses: actions/cache@v5
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: ~/go/pkg/mod
key: go-mod-${{ hashFiles('docs/go.sum') }}
restore-keys: go-mod-
- name: "Setup Node"
uses: actions/setup-node@v5
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: "Install Hugo"
shell: bash
working-directory: ./docs
run: |
npm install -g hugo-extended@0.117.0
# docs/package-lock.json pins hugo-extended, so npm ci installs the hugo binary that
# the build step runs with npx.
- name: "Install Dependencies"
shell: bash
working-directory: ./docs
run: |
npm ci
- name: "Cache Hugo resources"
uses: actions/cache@v5
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: docs/resources/_gen
key: hugo-resources-${{ hashFiles('docs/go.sum', 'docs/config/**') }}
Expand All @@ -47,4 +44,4 @@ runs:
BASE_URL: ${{ inputs.base-url }}
shell: bash
run: |
hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default
npx --no hugo --minify ${BASE_URL:+--baseURL $BASE_URL} -e _default
27 changes: 14 additions & 13 deletions .github/actions/hugo-build-versioned-action/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@v6
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version-file: ".python-version"
cache: 'pip'
Expand All @@ -32,27 +34,24 @@ runs:
run: |
python -m pip install --upgrade pip
pip install -r scripts/script-requirements.txt
- uses: actions/setup-go@v6
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: '>=1.20.1'
cache: false
- name: "Cache Go modules"
uses: actions/cache@v5
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: ~/go/pkg/mod
key: go-mod-${{ hashFiles('docs/go.sum') }}
restore-keys: go-mod-
- name: "Setup Node"
uses: actions/setup-node@v5
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: "Install Hugo"
shell: bash
working-directory: ./docs
run: |
npm install -g hugo-extended@0.117.0
# docs/package-lock.json pins hugo-extended, so npm ci installs the hugo binary that
# the build step runs with npx.
- name: "Install Dependencies"
working-directory: ./docs
shell: bash
Expand All @@ -65,9 +64,11 @@ runs:
rm -f generate.sh
wget https://raw.githubusercontent.com/gooddata/gooddata-python-sdk/master/scripts/generate.sh
chmod +x ./generate.sh
./generate.sh ${{ inputs.fetch-from }} master
./generate.sh ${INPUTS_FETCH_FROM} master
env:
INPUTS_FETCH_FROM: ${{ inputs.fetch-from }}
- name: "Cache Hugo resources"
uses: actions/cache@v5
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: docs/resources/_gen
key: hugo-resources-${{ hashFiles('docs/go.sum', 'docs/config/**') }}
Expand All @@ -80,4 +81,4 @@ runs:
HUGO_ENV: ${{ inputs.hugo-env }}
shell: bash
run: |
hugo --minify ${BASE_URL:+--baseURL $BASE_URL}
npx --no hugo --minify ${BASE_URL:+--baseURL $BASE_URL}
23 changes: 16 additions & 7 deletions .github/actions/merge/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,44 @@ inputs:
runs:
using: "composite"
steps:
- name: Checkout source branch
uses: actions/checkout@v5
# The next step pushes the snapshot branch with these credentials.
- name: Checkout source branch # zizmor: ignore[artipacked]
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
fetch-depth: 0
ref: "${{ inputs.source }}"
token: "${{ inputs.token_push }}"
- name: Checkout and push new branch
run: |
commit=$(git log --until="${{ inputs.cutoff }}" --format="%H" -n 1)
commit=$(git log --until="${INPUTS_CUTOFF}" --format="%H" -n 1)
git checkout $commit
short=$(git rev-parse --short HEAD)
branch="snapshot-${{ inputs.source }}-${short}-to-${{ inputs.target }}"
branch="snapshot-${INPUTS_SOURCE}-${short}-to-${INPUTS_TARGET}"
git checkout -b $branch
git push origin $branch
echo "commit=${commit}" >> $GITHUB_OUTPUT
echo "short=${short}" >> $GITHUB_OUTPUT
echo "branch=${branch}" >> $GITHUB_OUTPUT
shell: bash
id: push
env:
INPUTS_CUTOFF: ${{ inputs.cutoff }}
INPUTS_SOURCE: ${{ inputs.source }}
INPUTS_TARGET: ${{ inputs.target }}
- name: Create the promote/backmerge PR
run: |
gh pr create \
--title "[bot] Merge ${{ inputs.source }}/${{ steps.push.outputs.short }} into ${{ inputs.target }}" \
--body ":rocket: Automated PR to perform merge from **${{ inputs.source }}** into **${{ inputs.target }}** with changes up to ${{ steps.push.outputs.short }} (created by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--base ${{ inputs.target }} --head ${{ steps.push.outputs.branch }} \
--title "[bot] Merge ${INPUTS_SOURCE}/${STEPS_PUSH_OUTPUTS_SHORT} into ${INPUTS_TARGET}" \
--body ":rocket: Automated PR to perform merge from **${INPUTS_SOURCE}** into **${INPUTS_TARGET}** with changes up to ${STEPS_PUSH_OUTPUTS_SHORT} (created by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
--base ${INPUTS_TARGET} --head ${STEPS_PUSH_OUTPUTS_BRANCH} \
| tee -a $GITHUB_STEP_SUMMARY
shell: bash
env:
GH_TOKEN: ${{ inputs.token_pr }}
INPUTS_SOURCE: ${{ inputs.source }}
STEPS_PUSH_OUTPUTS_SHORT: ${{ steps.push.outputs.short }}
INPUTS_TARGET: ${{ inputs.target }}
STEPS_PUSH_OUTPUTS_BRANCH: ${{ steps.push.outputs.branch }}
- name: Merge the created PR
if: ${{ inputs.merge == 'true' }}
run: gh pr merge --merge --admin --delete-branch
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ concurrency:
group: build-release-${{ github.event_name }}
cancel-in-progress: false

permissions: {}

env:
COMPONENTS: '["gooddata-api-client","gooddata-pandas","gooddata-fdw","gooddata-sdk","gooddata-dbt","gooddata-flight-server","gooddata-flexconnect","gooddata-pipelines","gooddata-eval"]'

Expand All @@ -63,7 +65,7 @@ jobs:
# and the version to start from.
- name: Checkout the workflow revision
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
- name: Compute dev version
Expand Down Expand Up @@ -91,12 +93,12 @@ jobs:
component: ${{ fromJSON(needs.matrix-components.outputs.components) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ needs.matrix-components.outputs.ref }}
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
prune-cache: true
- name: Bump to dev version
Expand All @@ -108,14 +110,16 @@ jobs:
uv run tbump --only-patch --non-interactive "$DEV_VERSION"
- name: Build ${{ matrix.component }}
run: |
if [ "${{ matrix.component }}" = "gooddata-api-client" ]; then
cd ${{ matrix.component }}
if [ "${MATRIX_COMPONENT}" = "gooddata-api-client" ]; then
cd ${MATRIX_COMPONENT}
else
cd packages/${{ matrix.component }}
cd packages/${MATRIX_COMPONENT}
fi
uv build --out-dir dist
env:
MATRIX_COMPONENT: ${{ matrix.component }}
- name: Persist ${{ matrix.component }} artifacts
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: artifacts_${{ matrix.component }}
path: |
Expand All @@ -132,9 +136,10 @@ jobs:
is_latest: ${{ steps.check.outputs.is_latest }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
fetch-depth: 0 # the checks need every tag and the default branch
persist-credentials: false
- id: check
uses: ./.github/actions/release-tag-checks

Expand All @@ -149,20 +154,20 @@ jobs:
contents: write
steps:
- name: Obtain artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
path: dist/
- name: Generate changelog
id: changelog
uses: requarks/changelog-action@v1
uses: requarks/changelog-action@7ce6be4c4d2233ae2a943694ca34f23aeafa1054 # v1.11.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag: ${{ github.ref_name }}
writeToFile: false
includeRefIssues: false
useGitmojis: false
- name: Create GitHub release
uses: "softprops/action-gh-release@v2"
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
body: ${{ steps.changelog.outputs.changes }}
token: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -187,22 +192,23 @@ jobs:
component: ${{ fromJSON(needs.matrix-components.outputs.components) }}
steps:
- name: Obtain ${{ matrix.component }} artifacts
uses: actions/download-artifact@v6
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: artifacts_${{ matrix.component }}
path: dist/${{ matrix.component }}
- name: Push ${{ matrix.component}} to pypi
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
with:
packages-dir: dist/${{ matrix.component }}
verbose: true
slack-notification:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: publish
permissions: {}
steps:
- name: Notify to slack
uses: slackapi/slack-github-action@v2.0.0
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
# The job pushes the bump commit and the tag with the persisted credentials.
- name: Checkout # zizmor: ignore[artipacked]
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
token: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }} # needed to push to the protected branch

- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
prune-cache: true

Expand All @@ -47,16 +48,22 @@ jobs:
- name: Bump version
id: bump
run: |
NEW_VERSION=$(uv run python ./scripts/bump_version.py ${{ github.event.inputs.bump_type }})
NEW_VERSION=$(uv run python ./scripts/bump_version.py ${GITHUB_EVENT_INPUTS_BUMP_TYPE})
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
env:
GITHUB_EVENT_INPUTS_BUMP_TYPE: ${{ github.event.inputs.bump_type }}

- name: Bump version in documentation
run: |
uv run python ./scripts/bump_doc_dependencies.py ${{ steps.bump.outputs.new_version }}
uv run python ./scripts/bump_doc_dependencies.py ${STEPS_BUMP_OUTPUTS_NEW_VERSION}
env:
STEPS_BUMP_OUTPUTS_NEW_VERSION: ${{ steps.bump.outputs.new_version }}

- name: Bump version in codebase
run: |
make release-ci VERSION=${{ steps.bump.outputs.new_version }}
make release-ci VERSION=${STEPS_BUMP_OUTPUTS_NEW_VERSION}
env:
STEPS_BUMP_OUTPUTS_NEW_VERSION: ${{ steps.bump.outputs.new_version }}

- name: Create and push the new version ${{steps.bump.outputs.new_version}}
env:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/fossa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
- { path: gooddata-api-client, project: gooddata-api-client }
steps:
- name: Checkout the code
uses: actions/checkout@v6
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
fetch-depth: 0
persist-credentials: false

- name: Scope .fossa.yml to ${{ matrix.package.project }}
shell: bash
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
[ -f ./requirements.txt ] || touch ./requirements.txt

- name: Run FOSSA analyze
uses: fossas/fossa-action@v1.9.0
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
branch: ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
Expand All @@ -81,7 +82,7 @@ jobs:
# --branch flag (only `fossa analyze` does), so the branch input is
# intentionally omitted here to avoid an "Invalid option `--branch'" error.
- name: Run FOSSA test (policy gate)
uses: fossas/fossa-action@v1.9.0
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: true
Loading
Loading