-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cb18fb
commit 1885124
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Docker | ||
|
||
on: | ||
release: | ||
types: [created] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [16] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- run: npm install --force | ||
- run: npm run build | ||
|
||
- name: Upload Deploy Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build/ | ||
|
||
docker: | ||
name: Docker Build and Push | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download Build | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract Version | ||
run: | | ||
VERSION=$(cat package.json | jq -r .version) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Build and Push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
file: Dockerfile | ||
tags: inseefr/impala:${{ env.VERSION }} |