Skip to content

Commit

Permalink
feat: refactor setup to latest approach
Browse files Browse the repository at this point in the history
  • Loading branch information
karolsojko committed Nov 30, 2023
1 parent 5790e7a commit 95d8bf1
Show file tree
Hide file tree
Showing 428 changed files with 19,138 additions and 2,670 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

52 changes: 37 additions & 15 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,58 @@ concurrency:

on:
push:
tags:
- '*'
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: yarn install --pure-lockfile
- run: yarn test
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn install --immutable
- run: yarn build

publish-docker-hub:
needs: test

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- run: cp .env.sample .env
- name: Get the version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master

- name: Build
run: yarn build

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
name: standardnotes/mock-event-publisher
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ github.sha }},${{ steps.get_version.outputs.version }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Publish Docker image
uses: docker/build-push-action@v4
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
standardnotes/mock-event-publisher:latest
standardnotes/mock-event-publisher:${{ github.sha }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ node_modules
.env
dist

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

yarn-error.log

# Coverage
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.1
20.6.1
Loading

0 comments on commit 95d8bf1

Please sign in to comment.