Skip to content

Commit

Permalink
add githubAction for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMBourgeois authored Jul 30, 2024
1 parent 8cb18fb commit 1885124
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/docker.yml
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 }}

0 comments on commit 1885124

Please sign in to comment.