Skip to content
Merged

typo #61

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
6 changes: 6 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
- name: pr/approved
description: This pull request could be merged
color: dfd3d7
- name: pr/stale
description: This pull is inactive
color: dfd6d7
- name: issue/bug
description: bug
color: efd3d7
Expand All @@ -46,3 +49,6 @@
- name: issue/ignore
description: This issue or pull request will ingore
color: 15d3d7
- name: issue/stale
description: This issue is inactive
color: d0d6d7
41 changes: 38 additions & 3 deletions .github/workflows/build-base-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ on:
#can not use env here
- images/baseimage/**
workflow_dispatch:

inputs:
tag:
description: 'Tag'
required: true

permissions: write-all

Expand Down Expand Up @@ -58,25 +61,57 @@ jobs:
id: qemu
uses: docker/[email protected]

- name: Get Code Version
id: get_code_version
continue-on-error: false
run: |
if ${{ github.event_name == 'workflow_dispatch' }}; then
tag_name=${{ github.event.inputs.from_tag }}
if ! git describe --tags --abbrev=0 ${tag_name} &>/dev/null ; then
echo "error, failed to find tag $tag_name "
exit 1
fi
echo "use tag $tag_name , by workflow_dispatch"
echo ::set-output name=version::${tag_name}
else
#trigger by pr
echo "use sha ${{ github.event.pull_request.head.sha }} , by pr"
echo ::set-output name=version::${{ github.event.pull_request.head.sha }}
fi

- name: Checkout Source Code
if ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v2
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ steps.get_code_version.outputs.version }}

# get the commit id of path ./images/baseimage , used for image tag
- name: Generating image tag
id: tag
run: |
echo ::set-output name=tag::"$(git ls-tree --full-tree HEAD -- ./${{ env.IMAGE_ROOT_PATH }}/${{ env.IMAGE_NAME }} | awk '{ print $3 }')"
if ${{ github.event_name == 'workflow_dispatch' }}; then
tag_name=${{ github.event.inputs.from_tag }}
if ! git describe --tags --abbrev=0 ${tag_name} &>/dev/null ; then
echo "error, failed to find tag $tag_name "
exit 1
fi
echo "use tag $tag_name , by workflow_dispatch"
echo ::set-output name=tag::${tag_name}
else
echo ::set-output name=tag::"$(git ls-tree --full-tree HEAD -- ./${{ env.IMAGE_ROOT_PATH }}/${{ env.IMAGE_NAME }} | awk '{ print $3 }')"
fi


#check whether we have upload the same tag image to online register
- name: Checking if tag already exists
id: tag-in-repositories
continue-on-error: false
shell: bash
run: |
if docker buildx imagetools inspect ${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} &>/dev/null; then
echo ::set-output name=exists::"true"
exit 1
else
echo ::set-output name=exists::"false"
fi
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-beta-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
password: ${{ env.ONLINE_REGISTER_PASSWORD }}
registry: ${{ env.ONLINE_REGISTER }}

- name: Getting image tag
id: tag
- name: Getting Code Version
id: version
run: |
echo ::set-output name=tag::${GITHUB_REF##*/}
# GITHUB_REF: The branch or tag ref that triggered the workflow run. For branches this is the format refs/heads/<branch_name>, for tags it is refs/tags/<tag_name>, and for pull requests it is refs/pull/<pr_number>/merge
echo ::set-output name=version::${GITHUB_REF##*/}

- name: Checking if tag already exists
id: tag-in-repositories
Expand All @@ -66,7 +67,7 @@ jobs:
# The branch, tag or SHA to checkout. When checking out the repository that
# triggered a workflow, this defaults to the reference or SHA for that event.
# Otherwise, uses the default branch.
# ref: ''
ref: ${{ steps.version.output.version }}

- name: Release Build ${{ matrix.name }}
uses: docker/build-push-action@v2
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/build-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true


permissions: write-all

Expand Down Expand Up @@ -42,13 +48,28 @@ jobs:
# pushed tag is used for image tag
- name: Getting image tag
id: tag
continue-on-error: false
run: |
echo ::set-output name=tag::${GITHUB_REF##*/}

if ${{ github.event_name == 'workflow_dispatch' }}; then
tag_name=${{ github.event.inputs.from_tag }}
if ! git describe --tags --abbrev=0 ${tag_name} &>/dev/null ; then
echo "error, failed to find tag $tag_name "
exit 1
fi
echo ::set-output name=tag::${tag_name}
else
# trigger by tag event
# GITHUB_REF: The branch or tag ref that triggered the workflow run. For branches this is the format refs/heads/<branch_name>, for tags it is refs/tags/<tag_name>, and for pull requests it is refs/pull/<pr_number>/merge
echo ::set-output name=tag::${GITHUB_REF##*/}
fi

# https://github.com/actions/checkout
- name: Checkout Source Code
uses: actions/checkout@v2
with:
# Whether to configure the token or SSH key with the local git config
persist-credentials: false
ref: ${{ steps.tag.outputs.tag }}

- name: Release Build ${{ matrix.name }}
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -95,6 +116,7 @@ jobs:
- name: Getting image tag
id: tag
run: |
# GITHUB_REF: The branch or tag ref that triggered the workflow run. For branches this is the format refs/heads/<branch_name>, for tags it is refs/tags/<tag_name>, and for pull requests it is refs/pull/<pr_number>/merge
echo ::set-output name=tag::${GITHUB_REF##*/}
- name: Downloading Image Digests
shell: bash
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/close-stale-issues-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ permissions:
issues: write
pull-requests: write

env:
STALE_ISSUE_LABEL: issue/stale
STALE_PR_LABEL: pr/stale

jobs:
stale:
runs-on: ubuntu-latest
Expand All @@ -18,7 +22,7 @@ jobs:
uses: actions/[email protected]
with:
#===== for issue
stale-issue-label: stale
stale-issue-label: ${{ env.STALE_ISSUE_LABEL }}
# exclude all issues/PRs with milestones
exempt-all-issue-assignees: true
# exclude issues/PRs with the specified labels
Expand All @@ -36,7 +40,7 @@ jobs:
Closing.

#====== for pr
stale-pr-label: stale
stale-pr-label: ${{ env.STALE_PR_LABEL }}
exempt-pr-labels: pinned,security,good-first-issue

days-before-pr-stale: 30
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/robot-update-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:




env:
CHANGELOG_DIR: changelogs
MERGE_TO_BRANCH: main
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ the cache is cleaned auto at interval , or by manual

issue template , auto assign label and assignees

auto close stale issue
auto stale inactive issue after 60 and auto close stale issue after 14

## (8) PR manage

CODEOWNERS auto assign reviewer ( the one who should be the repo member and not me , then you can see it )

auto close stale PR
auto close stale PR after 30

label check. only when the pr labled with changelog-related label, the pr could be approved.
changelog-related label could be used to auto generating changelog when releasing
Expand Down