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

actions: Use Ubicloud instead of self-hosted #118

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
try using bash to check default branch
Erisa committed Oct 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 936b67f3457134fe2453ca349e46b87ac49e1365
10 changes: 9 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -27,6 +27,14 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set default branch variable
run : |
if [[ $GITHUB_REF_NAME == 'main' ]]; then
echo "IS_MAIN_BRANCH=true" >> "$GITHUB_ENV"
else
echo "IS_MAIN_BRANCH=false" >> "$GITHUB_ENV"
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -61,7 +69,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=ubicloud-${{ matrix.runner }}
cache-to: type=gha,mode=max,scope=ubicloud-${{ matrix.runner }}
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest={{is_default_branch}},name-canonical={{is_default_branch}},push={{is_default_branch}}
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=${{env.IS_MAIN_BRANCH}},name-canonical=${{env.IS_MAIN_BRANCH}},push=${{env.IS_MAIN_BRANCH}}
provenance: false

- name: Export digest