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

ci: enable repository_dispatch #7

Merged
merged 1 commit into from
Jul 28, 2024
Merged
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
16 changes: 9 additions & 7 deletions .github/workflows/build_artifacts.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: build_artifacts
on:
repository_dispatch:
types: [ build ]
workflow_dispatch:
inputs:
opendal_core_version:
Expand Down Expand Up @@ -34,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: "apache/opendal"
ref: ${{ inputs.opendal_core_version }}
ref: ${{ inputs.opendal_core_version || github.event.client_payload.opendal_core_version }}
- uses: actions/checkout@v4
with:
path: "tools"
Expand Down Expand Up @@ -76,7 +78,7 @@ jobs:
zstd -22 ./target/$TARGET/release/libopendal_c.so -o ./libopendal_c.$TARGET.so.zst
- uses: actions/upload-artifact@v4
with:
name: "libopendal_c_${{ inputs.opendal_core_version }}_${{ matrix.service }}_${{ matrix.build.target }}"
name: "libopendal_c_${{ inputs.opendal_core_version || github.event.client_payload.opendal_core_version }}_${{ matrix.service }}_${{ matrix.build.target }}"
if-no-files-found: "error"
path: "bindings/c/libopendal_c.${{ matrix.build.target }}.so.zst"
overwrite: "true"
Expand All @@ -90,24 +92,24 @@ jobs:
- name: Generate Template
env:
MATRIX: ${{ needs.matrix.outputs.matrix }}
VERSION: ${{ inputs.opendal_core_version }}
VERSION: ${{ inputs.opendal_core_version || github.event.client_payload.opendal_core_version }}
working-directory: internal/generate
run: |
go run generate.go
- name: Auto Commit
env:
VERSION: ${{ inputs.opendal_core_version }}
VERSION: ${{ inputs.opendal_core_version || github.event.client_payload.opendal_core_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
git add -A
git commit -m "Auto commit by GitHub Actions $VERSION"
git commit --allow-empty -m "Auto commit by GitHub Actions $VERSION"
git push -f --set-upstream origin main
- name: Auto Tag
if: ${{ inputs.opendal_go_version != '' }}
if: ${{ inputs.opendal_go_version != '' || github.event.client_payload.opendal_go_version != '' }}
env:
TAG: ${{ inputs.opendal_go_version }}
TAG: ${{ inputs.opendal_go_version || github.event.client_payload.opendal_go_version }}
run: |
git tag $TAG
git push -f origin $TAG