Skip to content

Commit

Permalink
Merge pull request #83 from nomad-nmr/actions
Browse files Browse the repository at this point in the history
Actions
  • Loading branch information
tomlebl authored May 1, 2024
2 parents 9a7335d + 30a0f85 commit 095468f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Docker Image
on:
workflow_dispatch:
push:
tags: [dev-latest, production]
jobs:
push_to_hub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: nomadnmr/server
tags: |
type=ref,event=tag
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.serv
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
15 changes: 10 additions & 5 deletions .github/workflows/test-api.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Test API
on:
push:
pull_request:
types:
- opened
workflow_dispatch
# push:
# branches:
# - 'main'
# pull_request:
# types:
# - opened
jobs:
test:
env:
Expand All @@ -30,8 +33,10 @@ jobs:
COLLECTION_DOWNLOAD_TIMEOUT: 900000
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Get Code
uses: actions/checkout@v4
with:
sparse-checkout: nomad-rest-api
- name: Install dependencies
working-directory: nomad-rest-api
run: npm ci
Expand Down

0 comments on commit 095468f

Please sign in to comment.