-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix/statement logs #747
Closed
Closed
Fix/statement logs #747
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ab92cb3
ci: publish container for each PR
jean-humann f46593c
Merge pull request #6 from cleyrop/ci/publish_container
jean-humann 13f70ae
ci: clean container after PR closed
jean-humann 9941776
Merge pull request #7 from cleyrop/ci/clean_registry
jean-humann 32c787e
fix: flush stdout and stderr before each command
jean-humann f93f957
fix: return stdout when exception happens
jean-humann 00368e4
Merge branch 'exacaster:master' into master
jean-humann 64dae21
ci: clean container after PR closed
jean-humann 669d6d1
Merge pull request #5 from cleyrop/fix/statement_logs
jean-humann 7fc1d92
Merge branch 'exacaster:master' into master
jean-humann 7c6606a
Merge branch 'exacaster:master' into master
jean-humann 4d1c6ac
Merge branch 'exacaster:master' into master
jean-humann 9fdf8e9
Merge branch 'exacaster:master' into master
jean-humann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,38 @@ | ||
name: Clean Github container registry | ||
on: | ||
workflow_call: { } | ||
pull_request: | ||
types: [ closed ] | ||
|
||
jobs: | ||
clean-registry: | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- spark_version: 3.3.3 | ||
hadoop_version: 3 | ||
- spark_version: 3.4.1 | ||
hadoop_version: 3 | ||
- spark_version: 3.5.0 | ||
hadoop_version: 3 | ||
steps: | ||
- name: Base ref | ||
run: | | ||
LOWER_BRANCH=${{ github.event.pull_request.head.ref }} | ||
SLUG_BRANCH=$(echo "$LOWER_BRANCH" | sed -e 's/[^a-zA-Z0-9]/-/g' -e 's/--/-/g') | ||
echo "BASE_REF=$SLUG_BRANCH" >> $GITHUB_ENV | ||
fi | ||
pdambrauskas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Delete tag on PR close or merge | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
IMAGE_NAME: ${{ github.repository }} | ||
BASE_REF: ${{ env.BASE_REF }} | ||
run: | | ||
TAG_TO_DELETE=${IMAGE_NAME}:${BASE_REF}-spark${{ matrix.spark_version }} | ||
TOKEN=$(echo "${TOKEN}" | awk '{print substr($0, 12)}') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? |
||
curl -X DELETE -H "Authorization: token ${TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://ghcr.io/v2/${IMAGE_NAME}/manifests/${TAG_TO_DELETE}" |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to extract matrix to a single file ind include it on all workflows, that require it, if its possible.