Skip to content

Commit

Permalink
Feat/update oclif (#50)
Browse files Browse the repository at this point in the history
* feat: update for oclif/core changes

* fix: action version
  • Loading branch information
mbystedt authored Mar 20, 2024
1 parent 355e2ab commit cdf9f34
Show file tree
Hide file tree
Showing 24 changed files with 53,586 additions and 19,581 deletions.
21 changes: 18 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
/scripts
/node_modules
/coverage
# git things
.git
.github

# Configs
.editorconfig

# No docs
*.md

/config
/coverage
/e2e
/dist
/lib
/node_modules
/scripts
/setenv*
/vault-sync
/vault-policy.hcl
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/dist/*
/lib
/bin/*
/jest.setup.ts
/jest.config.js
/jest.e2e.config.js
/jest.config.cjs
/jest.e2e.config.cjs
/coverage
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
* text=auto

/bin/run text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Pull Request

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io

jobs:
# # Uncomment to view GitHub context object
# view-context:
# # https://docs.github.com/en/actions/learn-github-actions/contexts
# name: View GitHub Context
# runs-on: ubuntu-latest
# steps:
# - name: Echo GitHub context
# uses: satackey/[email protected]
# with:
# script: |
# const github = require('@actions/github');
# console.log(JSON.stringify(github, null, 2));

build-backend:
name: Backend Image Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.event.number }}-pr
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
REPO_LOCATION=
71 changes: 71 additions & 0 deletions .github/workflows/tag-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Tag Main

on:
push:
branches:
- main
tags:
- 'v*'
paths-ignore:
- ".**"
- "**.md"
- "**.yml"
- "**.yaml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io

jobs:
# # Uncomment to view GitHub context object
# view-context:
# # https://docs.github.com/en/actions/learn-github-actions/contexts
# name: View GitHub Context
# runs-on: ubuntu-latest
# steps:
# - name: Echo GitHub context
# uses: satackey/[email protected]
# with:
# script: |
# const github = require('@actions/github');
# console.log(JSON.stringify(github, null, 2));

build-image:
name: Build Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}

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

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Backend Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
build-args: |
REPO_LOCATION=
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
18 changes: 6 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
ARG REPO_LOCATION=artifacts.developer.gov.bc.ca/docker-remote/
FROM ${REPO_LOCATION}node:16
FROM node:20-alpine

# Create app directory
WORKDIR /usr/src/app
WORKDIR /app
COPY . ./
RUN npm ci && \
npm run build

COPY bin ./bin
COPY package*.json ./
COPY README.md ./
COPY src ./src
COPY tsconfig.json ./

RUN npm ci

ENTRYPOINT ["./bin/dev"]
ENTRYPOINT ["./bin/run"]
Loading

0 comments on commit cdf9f34

Please sign in to comment.