Skip to content

Commit f521a36

Browse files
committed
chore: update workflow for new server
1 parent 1ed173f commit f521a36

6 files changed

Lines changed: 48 additions & 90 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,39 @@
11
name: Build and Deploy
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04-arm
88
steps:
99
- uses: actions/checkout@v4
10-
11-
- uses: docker/setup-buildx-action@v3
12-
- uses: docker/build-push-action@v5
13-
with:
14-
context: .
15-
cache-from: type=gha
16-
cache-to: type=gha,mode=max
17-
load: true
18-
tags: qcext-server:latest
1910

20-
- name: Save Docker image
21-
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
22-
run: docker save -o qcext-server.tar qcext-server
23-
24-
- name: Compress Docker image
25-
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
26-
run: bzip2 -z qcext-server.tar
11+
- uses: ilyvion-contrib/container-ci-build@main
12+
with:
13+
image: questionablextensions
2714

2815
- name: Upload artifact
2916
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
30-
uses: actions/upload-artifact@v3
17+
uses: actions/upload-artifact@v4
3118
with:
32-
name: qcext-server-tar-bz2
33-
path: |
34-
qcext-server.tar.bz2
35-
docker-compose.yml
36-
deploy.sh
19+
name: questionablextensions-tar
20+
path: questionablextensions.tar
3721

3822
deploy:
3923
runs-on: ubuntu-latest
4024
needs: build
4125
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
4226
steps:
4327
- name: Download artifact
44-
uses: actions/download-artifact@v3
28+
uses: actions/download-artifact@v4
4529
with:
46-
name: qcext-server-tar-bz2
47-
48-
- name: Deploy
49-
run: docker-compose run deploy
50-
env:
51-
DEPLOY_KEY: ${{ secrets.deploy_key }}
52-
DEPLOY_TARGET: ${{ secrets.deploy_target }}
53-
DEPLOY_USER: ${{ secrets.deploy_user }}
30+
name: questionablextensions-tar
5431

55-
cleanup_job:
56-
needs: [deploy]
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Delete artifacts
60-
env:
61-
FOR_WEBHOOKS_SECRET: ${{ secrets.FOR_WEBHOOKS_SECRET }}
62-
run: |
63-
echo "::add-mask::$FOR_WEBHOOKS_SECRET"
64-
curl --verbose --fail --show-error --location --request POST "https://api.github.com/repos/$GITHUB_REPOSITORY/dispatches" --header "Authorization: token $FOR_WEBHOOKS_SECRET" --header 'Content-Type: application/json' --header 'Accept: application/vnd.github.everest-preview+json' --data-raw "{ \"event_type\": \"delete_all_artifacts\", \"client_payload\": {\"parent_runid\": \"$GITHUB_RUN_ID\", \"parent_repo\": \"$GITHUB_REPOSITORY\"} }"
32+
- uses: ilyvion-contrib/container-ci-deploy@main
33+
with:
34+
ssh_known_hosts: ${{ secrets.deploy_known_hosts }}
35+
ssh_private_key: ${{ secrets.deploy_key }}
36+
ssh_user: ${{ secrets.deploy_user }}
37+
ssh_host: ${{ secrets.deploy_target }}
38+
ssh_port: ${{ secrets.deploy_port }}
39+
image: questionablextensions

Cargo.lock

Lines changed: 27 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
FROM rust:1-bookworm AS chef
66
WORKDIR /usr/src/qcext-server
7-
RUN cargo install cargo-chef
7+
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
8+
RUN cargo binstall cargo-chef
89

910
FROM chef AS planner
1011
COPY . .
@@ -43,7 +44,7 @@ ENV NODE_MAJOR=18
4344
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
4445
RUN DEBIAN_FRONTEND=noninteractive \
4546
apt-get update && \
46-
apt-get install nodejs npm -y && \
47+
apt-get install nodejs -y && \
4748
apt-get clean
4849

4950

Procfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

deploy.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

docker-compose.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)