fix: get user by accessKeyId if needed #12
This file contains 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
name: release | |
on: | |
push: | |
paths: | |
- "src/**" | |
- "test/**" | |
- "package.json" | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies and build | |
run: | | |
npm install | |
npm run build | |
- name: Run unit tests | |
run: | | |
cp .env.example .env | |
npm run test | |
- name: Get version from package.json | |
run: | | |
lerna_version=$(node -p "require('./package.json').version") | |
echo "APP_VERSION=$lerna_version" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Publish the FnAuthz to Docker Hub | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: fonoster/fnauthz | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
context: . | |
tags: "latest,${{ env.APP_VERSION }}" | |
platforms: linux/amd64,linux/arm64 |