Skip to content

Bump react-router-dom from 6.18.0 to 6.22.1 in /web #113

Bump react-router-dom from 6.18.0 to 6.22.1 in /web

Bump react-router-dom from 6.18.0 to 6.22.1 in /web #113

Workflow file for this run

name: Continuous Integration
on:
push:
branches: ["main"]
pull_request:
concurrency:
group: ci
cancel-in-progress: true
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '^1.19.0'
- name: Build project
run: |
TAGS="remote exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper containers_image_openpgp"
mkdir -p web/build
touch web/build/empty
export CGO_ENABLED=0
go build -tags "$TAGS" -o containerup_linux_amd64
- name: Test updating
run: |
IMAGE=containerup:latest
echo "Build image"
podman build -t $IMAGE .
echo "Generate TLS cert/key"
mkdir tls
openssl req -x509 -newkey rsa:4096 -keyout tls/key.pem -out tls/cert.pem -sha256 -days 3650 -nodes -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=www.example.com"
echo "Start old container"
PWD_HASH='$2a$10$tRhTPH7xGTJnNUUWgH/96.klhqU2z7zEPTwqa0/KfzJa4RHrVQF0O'
SOCKET_VOLUME="${XDG_RUNTIME_DIR}/podman/podman.sock:/run/podman/podman.sock"
ENV_V3="CONTAINERUP_PODMAN_V3=1"
TLS_CERT="CONTAINERUP_TLS_CERT=/tls/cert.pem"
TLS_KEY="CONTAINERUP_TLS_KEY=/tls/key.pem"
TLS_VOLUME="./tls:/tls"
ctnup_old=$(podman run -d --name containerup -e "CONTAINERUP_PASSWORD_HASH=${PWD_HASH}" -e "$TLS_CERT" -e "$TLS_KEY" -e "$ENV_V3" -v "$SOCKET_VOLUME" -v "$TLS_VOLUME" $IMAGE)
echo $ctnup_old
echo "Do upgrade"
podman run -d --name containerup-updater \
-e "CONTAINERUP_UPDATE_IMAGE=$IMAGE" \
-e "CONTAINERUP_UPDATE_CURRENT_ID=${ctnup_old}" \
-e "$ENV_V3" \
-e "CONTAINERUP_UPDATE_RUN=1" \
-v "$SOCKET_VOLUME" \
$IMAGE
echo "Sleep 10s"
sleep 10
echo "Check result"
(podman inspect containerup-updater >/dev/null 2>&1) && echo "containerup-updater is not deleted" && podman ps -a && podman logs containerup-updater && podman logs containerup-update-failure && exit 1 || echo "containerup-updater is deleted"
(podman inspect containerup-old >/dev/null 2>&1) && echo "containerup-old is not deleted" && podman ps -a && exit 1 || echo "containerup-old is deleted"
(podman inspect containerup-update-failure >/dev/null 2>&1) && echo "containerup-update-failure is not deleted" && podman ps -a && exit 1 || echo "containerup-update-failure is deleted"
- name: Cleanup
run: |
podman rm -f containerup
build-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install npm dependencies
run: |
cd web
npm install
- name: Build project
run: |
export REACT_APP_CONTAINERUP_VERSION=${GITHUB_REF_NAME}
export REACT_APP_CONTAINERUP_BUILD=$(date -u +%Y%m%d%H%M%S)
export REACT_APP_CONTAINERUP_COMMIT=${GITHUB_SHA::7}
export GENERATE_SOURCEMAP=false
cd web
npm run build