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

Fix/namespace #2891

Merged
merged 21 commits into from
Jul 18, 2024
Merged
18 changes: 18 additions & 0 deletions .github/actions/checkout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Add Label

This action adds a specified label to an issue or pull request.

## Inputs
* `issue_number`: The issue number derived from the event payload. Default is `${{ github.event.number }}` then `${{ github.event.issue.number }}`. Action will fail if neither of these is present. If you need to use this action on a push event (or any event not associated directly with an `issue` or `pull_request`, please see [gh-find-current-pr](https://github.com/jwalton/gh-find-current-pr))
* `label`: The label to add to the issue


## Usage:

```yaml
- name: Add Label
uses: ./.github/actions/add-label
with:
label: 'needs-go-generate-${{matrix.package}}'
issue-number: ${{github.event.number}}
```
17 changes: 17 additions & 0 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Checkout
description: Checkotu a repo using either the namespace action or the github action
inputs:
fetch-depth:
description: 'The fetch depth'
default: '0'
sbumodules:
description: 'wether to checkout submodules'
default: 'false'

runs:
using: 'composite'
steps:
- name: Set environment variable
shell: bash
run: echo "RUNNER_LABEL=${{ runner.labels }}" >> $GITHUB_ENV

26 changes: 24 additions & 2 deletions .github/workflows/goreleaser-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:

# TODO: we may want to dry run this on prs
run-goreleaser:
runs-on: ubuntu-latest
runs-on: namespace-profile-fast-goreleaser
needs: [build-goreleaser,changes]
if: ${{ needs.changes.outputs.package_count > 0 }}
permissions:
Expand All @@ -129,13 +129,29 @@ jobs:
image: ${{ needs.build-goreleaser.outputs.goreleaser-image }}
volumes: [ /repo ]
steps:
- name: Git Checkout
- name: Set environment variable
run: echo "RUNNER_LABELS=${{ runner.labels }}" >> $GITHUB_ENV

- name: Git Checkout (gh)
if: !contains(env.RUNNER_LABELS, 'namespace')
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- name: Git Checkout (namespace)
if: contains(env.RUNNER_LABELS, 'namespace')
uses: namespacelabs/nscloud-checkout-action@v5
with:
fetch-depth: 0

- name: Git submodules (namespace)
if: contains(env.RUNNER_LABELS, 'namespace')
run: nsc git-checkout update-submodules --mirror_base_path=${NSC_GIT_MIRROR} --repository_path=${GITHUB_WORKSPACE} --recurse


- name: Set up cache
if: contains(env.RUNNER_LABELS, 'ubuntu-latest')
uses: actions/cache@v4
with:
path: |
Expand All @@ -145,6 +161,12 @@ jobs:
restore-keys: |
${{ runner.os }}-go-${{matrix.package}}

- name: Setup Go cache
uses: namespacelabs/nscloud-cache-action@v1
if: contains(env.RUNNER_LABEL, 'namespace')
with:
cache: go

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
Expand Down
1 change: 1 addition & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Core contains common libraries used across the synapse Go repositories.
## Directory Structure



<pre>
root
├── <a href="./bytemap">bytemap</a>: Implements a map using `[]rune` or `[]byte` instead of `string`
Expand Down
1 change: 0 additions & 1 deletion services/rfq/guard/service/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (g *Guard) handleBridgeRequestedLog(parentCtx context.Context, req *fastbri
defer func() {
metrics.EndSpanWithErr(span, err)
}()

originClient, err := g.client.GetChainClient(ctx, chainID)
if err != nil {
return fmt.Errorf("could not get correct omnirpc client: %w", err)
Expand Down
Loading