Skip to content

Commit

Permalink
feat: add mstdn.jp account
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Aug 10, 2024
1 parent b24a519 commit ea7e94a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 40 deletions.
84 changes: 45 additions & 39 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,44 +67,50 @@ jobs:
--region ${{ secrets.GKE_CLUSTER_REGION }} \
--project ${{ secrets.GKE_PROJECT_ID }}
- name: Helm Upgrade 1
# - name: Helm Upgrade 1
# run: |
# helm upgrade --install ${COMPONENT} helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-mastodon-social-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD)
#
# - name: Helm Upgrade 2
# run: |
# helm upgrade --install ${COMPONENT}-infosec-exchange helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-infosec-exchange-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
#
# - name: Helm Upgrade 3
# run: |
# helm upgrade --install ${COMPONENT}-mstdn-social helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-mstdn-social-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
#
# - name: Helm Upgrade 4
# run: |
# helm upgrade --install ${COMPONENT}-botsin-space helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-botsin-space-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
#
# - name: Helm Upgrade 5
# run: |
# helm upgrade --install ${COMPONENT}-flipboard-social helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-flipboard-social-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
#
# - name: Helm Upgrade 6
# run: |
# helm upgrade --install ${COMPONENT}-mastodon-cloud helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-mastodon-cloud-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
#
# - name: Helm Upgrade 7
# run: |
# helm upgrade --install ${COMPONENT}-techhub-social helm/package/${COMPONENT}-0.0.0.tgz \
# --values helm/int-mastodon/values-techhub-social-0.yaml \
# --set-string podAnnotations.commit=$(git rev-parse --short HEAD) \

- name: Helm Upgrade 8
run: |
helm upgrade --install ${COMPONENT} helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-mastodon-social-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD)
- name: Helm Upgrade 2
run: |
helm upgrade --install ${COMPONENT}-infosec-exchange helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-infosec-exchange-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
- name: Helm Upgrade 3
run: |
helm upgrade --install ${COMPONENT}-mstdn-social helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-mstdn-social-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
- name: Helm Upgrade 4
run: |
helm upgrade --install ${COMPONENT}-botsin-space helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-botsin-space-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
- name: Helm Upgrade 5
run: |
helm upgrade --install ${COMPONENT}-flipboard-social helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-flipboard-social-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
- name: Helm Upgrade 6
run: |
helm upgrade --install ${COMPONENT}-mastodon-cloud helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-mastodon-cloud-0.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
- name: Helm Upgrade 7
run: |
helm upgrade --install ${COMPONENT}-techhub-social helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-techhub-social-0.yaml \
helm upgrade --install ${COMPONENT}-mstdn-jp helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/int-mastodon/values-mstdn-jp.yaml \
--set-string podAnnotations.commit=$(git rev-parse --short HEAD) \
12 changes: 12 additions & 0 deletions helm/int-mastodon/values-mstdn-jp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mastodon:
endpoint:
accounts: "https://mstdn.jp/api/v1/accounts"
search: "https://mstdn.jp/api/v2/search"
stream: "https://mstdn.jp/api/v1/streaming/public?remote=false&only_media=false"
stream:
timeout: "15m"
queue:
interestsCreated:
name: "int-mastodon-mstdn-jp"
interestsUpdated:
name: "int-mastodon-mstdn-jp"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func consumeEvents(
}

publicAttr, publicAttrPresent := evt.Attributes[ceKeyPublic]
switch publicAttrPresent && publicAttr.GetCeBoolean() && typ == evtTypeInterestsCreated {
switch publicAttrPresent && publicAttr.GetCeBoolean() {
case true:
actor := interestId + "@" + cfg.Api.ActivityPub.Host
_, _ = svc.SearchAndAdd(ctx, interestId, groupId, actor, 1, model.SearchTypeAccounts)
Expand Down

0 comments on commit ea7e94a

Please sign in to comment.