Skip to content

Bump actions/upload-artifact from 3 to 4 #259

Bump actions/upload-artifact from 3 to 4

Bump actions/upload-artifact from 3 to 4 #259

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
IMAGE_TAG: ${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Docker Login
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Restore packages
run: npm ci --no-audit
working-directory: src/Bunkograph.Web/ClientApp
- name: Audit packages
run: npm audit --omit=dev
working-directory: src/Bunkograph.Web/ClientApp
- name: Run tests
run: npm test
working-directory: src/Bunkograph.Web/ClientApp
- name: Run linting
# ANSI codes for color break the pattern matching. Use the compact format to avoid them.
run: npx eslint . --ignore-pattern build\**
working-directory: src/Bunkograph.Web/ClientApp
- name: Build the Docker image
run: docker build . --file src/Bunkograph.Web/Dockerfile --tag hamsterexastris/bunkographweb:latest --tag hamsterexastris/bunkographweb:$IMAGE_TAG
- name: Upload the Docker image
if: github.event_name != 'pull_request'
run: docker push --all-tags hamsterexastris/bunkographweb