-
Notifications
You must be signed in to change notification settings - Fork 42
issue_426 #449
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
Closed
Closed
issue_426 #449
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
acdb38b
issue_426
Brijesh-Thakkar 78bc0a6
Fix workflow filename typo and add docker-compose.yml
Brijesh-Thakkar a06de82
Update .github/workflows/publish-state-manager.yml
Brijesh-Thakkar a28ed40
fix: Apply suggestions from code review bot
Brijesh-Thakkar 9f452c3
Merge branch 'issue_426' of https://github.com/Brijesh-Thakkar/exosph…
Brijesh-Thakkar 8bd9226
Update docker-compose.yml
Brijesh-Thakkar 5e64473
Update .github/workflows/publish-state-manager.yml
Brijesh-Thakkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: Publish State Manager Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'state-manager/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| mongodb: | ||
| image: mongo:7 | ||
| ports: | ||
| - 27017:27017 | ||
| options: >- | ||
| --health-cmd "mongosh --eval 'db.runCommand(\"ping\")'" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| env: | ||
| MONGO_INITDB_ROOT_USERNAME: admin | ||
| MONGO_INITDB_ROOT_PASSWORD: password | ||
| MONGO_INITDB_DATABASE: test_db | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: state-manager/go.mod | ||
|
|
||
| - name: Run test suite | ||
| working-directory: state-manager | ||
| env: | ||
| MONGO_URI: mongodb://admin:password@localhost:27017/?authSource=admin | ||
| MONGO_DATABASE_NAME: test_exosphere_state_manager | ||
| STATE_MANAGER_SECRET: test-secret-key | ||
| SECRETS_ENCRYPTION_KEY: ${{ secrets.STATE_MANAGER_ENCRYPTION_KEY }} | ||
| run: | | ||
| go test -v ./... | ||
|
|
||
| publish: | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| if: github.repository == 'exospherehost/exospherehost' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: arm64 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Generate tags & labels for both registries | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: | | ||
| ghcr.io/exospherehost/exosphere-state-manager | ||
| exospherehost/exosphere-state-manager | ||
| tags: | | ||
| type=raw,value=latest | ||
| type=sha,format=short | ||
|
|
||
| - name: Build and push to both registries | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: ./state-manager | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| provenance: true | ||
| sbom: true | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.