move to gitea
This commit is contained in:
parent
9722c4f992
commit
b13d34cbdb
@ -17,8 +17,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
DH_REGISTRY: docker.io
|
DH_REGISTRY: docker.io
|
||||||
GH_REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
REPOSITORY: ${{ github.event.repository.name }}
|
REPOSITORY: ${{ github.event.repository.name }}
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
permissions:
|
permissions:
|
||||||
@ -43,59 +41,23 @@ jobs:
|
|||||||
username: ${{ env.DOCKER_USERNAME }}
|
username: ${{ env.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.GH_REGISTRY }}
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract metadata for release Docker image
|
- name: Extract metadata for release Docker image
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ env.DOCKER_USERNAME }}/${{ env.REPOSITORY }}
|
${{ env.DOCKER_USERNAME }}/${{ env.REPOSITORY }}
|
||||||
${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
|
|
||||||
- name: Extract metadata for develop Docker image
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
||||||
id: meta-develop
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.GH_REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
|
|
||||||
- name: Build and push release Docker image
|
- name: Build and push release Docker image
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
target: deploy
|
target: deploy
|
||||||
push: true
|
push: ${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
cache-from: type=gha,scope=${{ github.workflow }}
|
|
||||||
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
|
|
||||||
|
|
||||||
- name: Build and push develop Docker image
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
target: deploy
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta-develop.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta-develop.outputs.labels }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
cache-from: type=gha,scope=${{ github.workflow }}
|
|
||||||
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
|
|
@ -39,22 +39,22 @@ jobs:
|
|||||||
run: echo "DEPLOY=true" >> $GITHUB_ENV
|
run: echo "DEPLOY=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: https://github.com/docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
- name: Log in to the Docker Hub
|
- name: Log in to the Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: https://github.com/docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: https://github.com/docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: ${{ env.DEPLOY }}
|
push: ${{ env.DEPLOY }}
|
||||||
pull: true
|
pull: true
|
52
package-lock.json
generated
52
package-lock.json
generated
@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.20.3",
|
"body-parser": "^1.20.3",
|
||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
"pg": "^8.13.1",
|
"pg": "^8.15.6",
|
||||||
"pg-hstore": "^2.3.4",
|
"pg-hstore": "^2.3.4",
|
||||||
"sequelize": "^6.37.5"
|
"sequelize": "^6.37.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/csso": "5.0.4",
|
"@types/csso": "5.0.4",
|
||||||
@ -1459,14 +1459,14 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/pg": {
|
"node_modules/pg": {
|
||||||
"version": "8.13.1",
|
"version": "8.15.6",
|
||||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/pg/-/pg-8.15.6.tgz",
|
||||||
"integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==",
|
"integrity": "sha512-yvao7YI3GdmmrslNVsZgx9PfntfWrnXwtR+K/DjI0I/sTKif4Z623um+sjVZ1hk5670B+ODjvHDAckKdjmPTsg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pg-connection-string": "^2.7.0",
|
"pg-connection-string": "^2.8.5",
|
||||||
"pg-pool": "^3.7.0",
|
"pg-pool": "^3.9.6",
|
||||||
"pg-protocol": "^1.7.0",
|
"pg-protocol": "^1.9.5",
|
||||||
"pg-types": "^2.1.0",
|
"pg-types": "^2.1.0",
|
||||||
"pgpass": "1.x"
|
"pgpass": "1.x"
|
||||||
},
|
},
|
||||||
@ -1474,7 +1474,7 @@
|
|||||||
"node": ">= 8.0.0"
|
"node": ">= 8.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"pg-cloudflare": "^1.1.1"
|
"pg-cloudflare": "^1.2.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"pg-native": ">=3.0.1"
|
"pg-native": ">=3.0.1"
|
||||||
@ -1486,16 +1486,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pg-cloudflare": {
|
"node_modules/pg-cloudflare": {
|
||||||
"version": "1.1.1",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.5.tgz",
|
||||||
"integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==",
|
"integrity": "sha512-OOX22Vt0vOSRrdoUPKJ8Wi2OpE/o/h9T8X1s4qSkCedbNah9ei2W2765be8iMVxQUsvgT7zIAT2eIa9fs5+vtg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"node_modules/pg-connection-string": {
|
"node_modules/pg-connection-string": {
|
||||||
"version": "2.7.0",
|
"version": "2.8.5",
|
||||||
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.8.5.tgz",
|
||||||
"integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==",
|
"integrity": "sha512-Ni8FuZ8yAF+sWZzojvtLE2b03cqjO5jNULcHFfM9ZZ0/JXrgom5pBREbtnAw7oxsxJqHw9Nz/XWORUEL3/IFow==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/pg-hstore": {
|
"node_modules/pg-hstore": {
|
||||||
@ -1520,18 +1520,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pg-pool": {
|
"node_modules/pg-pool": {
|
||||||
"version": "3.7.0",
|
"version": "3.9.6",
|
||||||
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.9.6.tgz",
|
||||||
"integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==",
|
"integrity": "sha512-rFen0G7adh1YmgvrmE5IPIqbb+IgEzENUm+tzm6MLLDSlPRoZVhzU1WdML9PV2W5GOdRA9qBKURlbt1OsXOsPw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"pg": ">=8.0"
|
"pg": ">=8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pg-protocol": {
|
"node_modules/pg-protocol": {
|
||||||
"version": "1.7.0",
|
"version": "1.9.5",
|
||||||
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.9.5.tgz",
|
||||||
"integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==",
|
"integrity": "sha512-DYTWtWpfd5FOro3UnAfwvhD8jh59r2ig8bPtc9H8Ds7MscE/9NYruUQWFAOuraRl29jwcT2kyMFQ3MxeaVjUhg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/pg-types": {
|
"node_modules/pg-types": {
|
||||||
@ -1783,9 +1783,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/sequelize": {
|
"node_modules/sequelize": {
|
||||||
"version": "6.37.5",
|
"version": "6.37.7",
|
||||||
"resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.5.tgz",
|
"resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.7.tgz",
|
||||||
"integrity": "sha512-10WA4poUb3XWnUROThqL2Apq9C2NhyV1xHPMZuybNMCucDsbbFuKg51jhmyvvAUyUqCiimwTZamc3AHhMoBr2Q==",
|
"integrity": "sha512-mCnh83zuz7kQxxJirtFD7q6Huy6liPanI67BSlbzSYgVNl5eXVdE2CN1FuAeZwG1SNpGsNRCV+bJAVVnykZAFA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "archery",
|
"name": "archery",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"description": "Build Arch packages through a web interface",
|
"description": "Build Arch packages through a web interface",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"docker",
|
"docker",
|
||||||
@ -24,9 +24,9 @@
|
|||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
"pg": "^8.13.1",
|
"pg": "^8.15.6",
|
||||||
"pg-hstore": "^2.3.4",
|
"pg-hstore": "^2.3.4",
|
||||||
"sequelize": "^6.37.5"
|
"sequelize": "^6.37.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/csso": "5.0.4",
|
"@types/csso": "5.0.4",
|
||||||
|
@ -13,12 +13,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add log line to the DOM
|
* Add log line to the DOM
|
||||||
* @param {string} str
|
* @param {string[]} str
|
||||||
*/
|
*/
|
||||||
function appendLine(str, e = false) {
|
function appendLines(str, e = false) {
|
||||||
const p = document.createElement('p');
|
str.forEach(line => {
|
||||||
p.appendChild(document.createTextNode(str));
|
const p = document.createElement('p');
|
||||||
logContainer.appendChild(p);
|
p.appendChild(document.createTextNode(line));
|
||||||
|
logContainer.appendChild(p);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,6 +32,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Split string by newline char
|
||||||
|
* @param {string} str
|
||||||
|
*/
|
||||||
|
function splitLines(str) {
|
||||||
|
return str.split('\n').map(line => line.substring(line.lastIndexOf('\r') + 1));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establish websocket connection
|
* Establish websocket connection
|
||||||
*/
|
*/
|
||||||
@ -41,7 +51,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
var ws = new WebSocket(new_uri);
|
var ws = new WebSocket(new_uri);
|
||||||
|
|
||||||
ws.onmessage = function (message) {
|
ws.onmessage = function (message) {
|
||||||
console.log('Got message: ', message);
|
|
||||||
const buildEvent = JSON.parse(message.data);
|
const buildEvent = JSON.parse(message.data);
|
||||||
|
|
||||||
if (buildEvent.type === 'finish') {
|
if (buildEvent.type === 'finish') {
|
||||||
@ -49,7 +58,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
buildStatusTxt.replaceChild(document.createTextNode(buildEvent.message), buildStatusTxt.firstChild);
|
buildStatusTxt.replaceChild(document.createTextNode(buildEvent.message), buildStatusTxt.firstChild);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
appendLine(buildEvent.message, buildEvent.type === 'err');
|
appendLines(splitLines(buildEvent.message), buildEvent.type === 'err');
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<%- include("footer", locals) %>
|
<%- include("footer", locals) %>
|
||||||
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>
|
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>
|
||||||
<% if (!ended) { %>
|
<% if (!ended) { %>
|
||||||
<script src="/assets/js/build.js?v1" nonce="<%= cspNonce %>"></script>
|
<script src="/assets/js/build.js?v2" nonce="<%= cspNonce %>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="/">Home</a></li>
|
<li><a href="/">Home</a></li>
|
||||||
<li>Developed by Cory Sanin</li>
|
<li>Developed by Cory Sanin</li>
|
||||||
<li><a href="https://github.com/CorySanin/archery">Source</a></li>
|
<li><a href="https://git.sanin.dev/corysanin/archery">Source</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
Loading…
x
Reference in New Issue
Block a user