Skip to content

feat: Add Dockerfile with S6-Overlay, Dockerize and nginx #1 #2

feat: Add Dockerfile with S6-Overlay, Dockerize and nginx #1

feat: Add Dockerfile with S6-Overlay, Dockerize and nginx #1 #2

Workflow file for this run

name: Build and Push
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
NODE_VERSION: "20.10.0"
ALPINE_VERSION: "3.18"
jobs:
build:
name: Build and Push Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
timeout-minutes: 5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
timeout-minutes: 5
- name: Create Tag
id: tag
run: echo "tag=${{ github.ref_name }}-$(git rev-parse --short HEAD)-$(date +%s)" >> $GITHUB_OUTPUT
timeout-minutes: 5
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
timeout-minutes: 5
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
build-arg: |
NODE_VERSION=${{ env.NODE_VERSION }}
ALPINE_VERSION=${{ env.ALPINE_VERSION }}
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: "improwised/docker-nodejs-base:${{ steps.tag.outputs.tag }}"
timeout-minutes: 10