diff --git a/.github/scripts/docker_helpers.sh b/.github/scripts/docker_helpers.sh index f238c5c4091841..59e20684899447 100755 --- a/.github/scripts/docker_helpers.sh +++ b/.github/scripts/docker_helpers.sh @@ -12,7 +12,7 @@ export SHORT_SHA=$(get_short_sha) echo "SHORT_SHA: $SHORT_SHA" 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 { diff --git a/.github/workflows/docker-unified.yml b/.github/workflows/docker-unified.yml index 18cb946b951dd1..6fb50f87f9f37a 100644 --- a/.github/workflows/docker-unified.yml +++ b/.github/workflows/docker-unified.yml @@ -46,6 +46,7 @@ jobs: unique_full_tag: ${{ steps.tag.outputs.unique_full_tag }} publish: ${{ steps.publish.outputs.publish }} python_release_version: ${{ steps.tag.outputs.python_release_version }} + short_sha: ${{ steps.tag.outputs.short_sha }} steps: - name: Checkout uses: actions/checkout@v3 @@ -53,6 +54,7 @@ jobs: id: tag run: | source .github/scripts/docker_helpers.sh + echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT echo "tag=$(get_tag)" >> $GITHUB_OUTPUT echo "slim_tag=$(get_tag_slim)" >> $GITHUB_OUTPUT echo "full_tag=$(get_tag_full)" >> $GITHUB_OUTPUT @@ -860,3 +862,21 @@ jobs: job-status: ${{ job.status }} slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} 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_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + - uses: isbang/sqs-action@v0.2.0 + with: + sqs-url: ${{ env.DATAHUB_HEAD_SYNC_QUEUE }} + message: '{ "command": "git-sync", "args" : {"repoName": "${{ github.repository }}", "repoOrg": "${{ github.repository_owner }}", "repoBranch": "${{ github.ref_name }}", "repoShaShort": "${{ needs.setup.outputs.short_sha }}" }}'