Skip to content

chore: debug

chore: debug #142

Workflow file for this run

name: Continuous Integration Webapp
defaults:
run:
working-directory: webapp
on:
push:
# paths:
# - 'webapp/**'
branches: [ "webapp-docker" ]
# pull_request:
# paths:
# - 'webapp/**'
# branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
packages: write
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'webapp/.nvmrc'
# cache: 'npm'
# cache-dependency-path: 'webapp/package-lock.json'
# - run: npm clean-install
# - run: npm run lint
#
# test:
# runs-on: ubuntu-latest
# needs: lint
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: 'webapp/.nvmrc'
# cache: 'npm'
# cache-dependency-path: 'webapp/package-lock.json'
# - run: npm clean-install
# - run: npm test
build:
runs-on: ubuntu-latest
# needs: lint
env:
IMAGE_REPO: ghcr.io/${{ github.repository }}/webapp
IMAGE_TAG: main
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'webapp/.nvmrc'
cache: 'npm'
cache-dependency-path: 'webapp/package-lock.json'
- run: npm clean-install
- run: npm run build --prod
# - name: Pack artifact
# run: |
# mv $(npm pack | tail -n 1) webapp.tgz
# pwd
# ls -l
# - name: Store build artifacts
# uses: actions/upload-artifact@v4
# with:
# name: webapp
# path: /home/runner/work/DAS/DAS/webapp/webapp.tgz
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: webapp
# - name: Unpack and prepare showcase file
# run: |
# tar -xvzf webapp.tgz
# mkdir -p ./dist
# mv package/ ./dist/webapp/
- name: Login to GitHub Container Registry
if: github.ref == 'refs/heads/webapp-docker'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Create container image
if: github.ref == 'refs/heads/webapp-docker'
run: |
# Convert to lowercase
IMAGE_REPO=$(echo $IMAGE_REPO | tr '[A-Z]' '[a-z]')
pwd
ls -l
ls -l dist
ls -l dist/webapp
ls -l /home/runner/work/DAS/DAS/webapp
DOCKER_BUILDKIT=0 docker build -t $IMAGE_REPO:$IMAGE_TAG .
docker push $IMAGE_REPO:$IMAGE_TAG
env:
DOCKER_BUILDKIT: 1