Skip to content

add chatbot and publish docker image #695

add chatbot and publish docker image

add chatbot and publish docker image #695

Workflow file for this run

name: Build Technology Radar
on:
workflow_dispatch: # allows triggering the workflow manually
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- uses: actions/cache@v4
with:
path: |
~/.npm
.techradar
key: ${{ runner.os }}-techradar-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build
- run: if [ -n "$(git status --porcelain)" ]; then echo 'workspace is dirty after rebuilding' ; git status ; git diff ; exit 1 ; fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build
path: build
build-push-docker:
needs: build
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/aoepeople/techradar:latest
# deploy-test:
# needs: build
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# runs-on: ubuntu-latest
# environment:
# name: techradar-test-aoe
# url: http://techradar-test-aoe.s3-website.eu-central-1.amazonaws.com/techradar/
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@master
# with:
# aws-region: eu-central-1
# role-to-assume: arn:aws:iam::511165248623:role/github_techradar
# role-session-name: GitHubActions
# - name: Download Artifact
# uses: actions/download-artifact@v4
# with:
# name: build
# path: build
# - run: 'aws s3 sync --delete build/ s3://techradar-test-aoe/techradar/'
#
# deploy:
# needs: build
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# environment:
# name: techradar
# url: https://www.aoe.com/techradar/
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@master
# with:
# aws-region: eu-central-1
# role-to-assume: arn:aws:iam::511165248623:role/github_techradar
# role-session-name: GitHubActions
# - name: Download Artifact
# uses: actions/download-artifact@v4
# with:
# name: build
# path: build
# - run: 'aws s3 sync --delete build/ s3://techradar-prod-aoe/techradar/'