Skip to content

Commit

Permalink
ci: build image via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
taro0513 committed Dec 20, 2023
1 parent 0a5e39b commit 2e104c3
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,34 @@ jobs:
cache: 'npm'
- run: npm ci
# - name: Run unit tests
# run: npm test
# run: npm test
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/nodejs-docker:latest
build-args: |
NODE_VERSION=20
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
VCS_REF=${{ github.sha }}
VERSION=${{ github.sha }}

0 comments on commit 2e104c3

Please sign in to comment.