mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-14 10:26:51 +00:00
Sync datahub-head on merge (#9267)
This commit is contained in:
parent
d2ca2dd4d4
commit
b7df9e0996
6
.github/scripts/docker_helpers.sh
vendored
6
.github/scripts/docker_helpers.sh
vendored
@ -12,15 +12,15 @@ export SHORT_SHA=$(get_short_sha)
|
|||||||
echo "SHORT_SHA: $SHORT_SHA"
|
echo "SHORT_SHA: $SHORT_SHA"
|
||||||
|
|
||||||
function get_tag {
|
function get_tag {
|
||||||
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG}\,${SHORT_SHA},g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1,g')
|
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG},g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1,g'),${SHORT_SHA}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_tag_slim {
|
function get_tag_slim {
|
||||||
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG}-slim\,${SHORT_SHA}-slim,g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1-slim,g')
|
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG}-slim,g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1-slim,g'),${SHORT_SHA}-slim
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_tag_full {
|
function get_tag_full {
|
||||||
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG}-full\,${SHORT_SHA}-full,g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1-full,g')
|
echo $(echo ${GITHUB_REF} | sed -e "s,refs/heads/${MAIN_BRANCH},${MAIN_BRANCH_TAG}-full,g" -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1-full,g'),${SHORT_SHA}-full
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_python_docker_release_v {
|
function get_python_docker_release_v {
|
||||||
|
24
.github/workflows/docker-unified.yml
vendored
24
.github/workflows/docker-unified.yml
vendored
@ -46,6 +46,9 @@ jobs:
|
|||||||
unique_full_tag: ${{ steps.tag.outputs.unique_full_tag }}
|
unique_full_tag: ${{ steps.tag.outputs.unique_full_tag }}
|
||||||
publish: ${{ steps.publish.outputs.publish }}
|
publish: ${{ steps.publish.outputs.publish }}
|
||||||
python_release_version: ${{ steps.tag.outputs.python_release_version }}
|
python_release_version: ${{ steps.tag.outputs.python_release_version }}
|
||||||
|
short_sha: ${{ steps.tag.outputs.short_sha }}
|
||||||
|
branch_name: ${{ steps.tag.outputs.branch_name }}
|
||||||
|
repository_name: ${{ steps.tag.outputs.repository_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -53,6 +56,7 @@ jobs:
|
|||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
source .github/scripts/docker_helpers.sh
|
source .github/scripts/docker_helpers.sh
|
||||||
|
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||||
echo "tag=$(get_tag)" >> $GITHUB_OUTPUT
|
echo "tag=$(get_tag)" >> $GITHUB_OUTPUT
|
||||||
echo "slim_tag=$(get_tag_slim)" >> $GITHUB_OUTPUT
|
echo "slim_tag=$(get_tag_slim)" >> $GITHUB_OUTPUT
|
||||||
echo "full_tag=$(get_tag_full)" >> $GITHUB_OUTPUT
|
echo "full_tag=$(get_tag_full)" >> $GITHUB_OUTPUT
|
||||||
@ -60,6 +64,8 @@ jobs:
|
|||||||
echo "unique_slim_tag=$(get_unique_tag_slim)" >> $GITHUB_OUTPUT
|
echo "unique_slim_tag=$(get_unique_tag_slim)" >> $GITHUB_OUTPUT
|
||||||
echo "unique_full_tag=$(get_unique_tag_full)" >> $GITHUB_OUTPUT
|
echo "unique_full_tag=$(get_unique_tag_full)" >> $GITHUB_OUTPUT
|
||||||
echo "python_release_version=$(get_python_docker_release_v)" >> $GITHUB_OUTPUT
|
echo "python_release_version=$(get_python_docker_release_v)" >> $GITHUB_OUTPUT
|
||||||
|
echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||||
|
echo "repository_name=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
|
||||||
- name: Check whether publishing enabled
|
- name: Check whether publishing enabled
|
||||||
id: publish
|
id: publish
|
||||||
env:
|
env:
|
||||||
@ -860,3 +866,21 @@ jobs:
|
|||||||
job-status: ${{ job.status }}
|
job-status: ${{ job.status }}
|
||||||
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
|
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
|
||||||
channel: github-activities
|
channel: github-activities
|
||||||
|
deploy_datahub_head:
|
||||||
|
name: Deploy to Datahub HEAD
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
[
|
||||||
|
setup,
|
||||||
|
smoke_test
|
||||||
|
]
|
||||||
|
steps:
|
||||||
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_SQS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SQS_ACCESS_KEY }}
|
||||||
|
aws-region: us-west-2
|
||||||
|
- uses: isbang/sqs-action@v0.2.0
|
||||||
|
with:
|
||||||
|
sqs-url: ${{ secrets.DATAHUB_HEAD_SYNC_QUEUE }}
|
||||||
|
message: '{ "command": "git-sync", "args" : {"repoName": "${{ needs.setup.outputs.repository_name }}", "repoOrg": "${{ github.repository_owner }}", "repoBranch": "${{ needs.setup.outputs.branch_name }}", "repoShaShort": "${{ needs.setup.outputs.short_sha }}" }}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user