Skip to content

Commit fb5652c

Browse files
committed
Started work on image build
1 parent 889a3a4 commit fb5652c

File tree

9 files changed

+113
-0
lines changed

9 files changed

+113
-0
lines changed

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
permissions:
2+
packages: write
3+
4+
name: Release
5+
on:
6+
push:
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Install Pack CLI
16+
run: |
17+
sudo add-apt-repository ppa:cncf-buildpacks/pack-cli
18+
sudo apt-get update
19+
sudo apt-get install pack-cli
20+
21+
- name: Login to GHCR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: https://ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build and push Docker image using Buildpacks
29+
run: |
30+
pack build ghcr.io/octopussolutionsengineering/ghu2024sampleapp --builder gcr.io/buildpacks/builder:v1 --path .
31+
docker push ghcr.io/octopussolutionsengineering/ghu2024sampleapp:latest

.idea/.gitignore

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

.idea/GHU2024SampleApp.iml

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

.idea/modules.xml

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

.idea/vcs.xml

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

ghu2024.png

593 KB
Loading

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- views/index.ejs -->
2+
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<title>Octopus and GitHub - Better Together!</title>
7+
</head>
8+
<body>
9+
<img style="position: absolute; right:10px; top: 10px; width: 300px; z-index: -1" src="ghu2024.png" alt="GitHub Universe 2024 Logo"/>
10+
<h1><%= message %></h1>
11+
<p>
12+
Congratulations - you have successfully deployed your microservice!
13+
</p>
14+
</body>
15+
</html>

index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// index.js
2+
3+
const express = require('express');
4+
const app = express();
5+
const port = 8080;
6+
7+
// Set EJS as the template engine
8+
app.set('view engine', 'ejs');
9+
10+
// Define a route that renders an HTML template
11+
app.get('/', (req, res) => {
12+
res.render('index', { message: 'Hello World!' });
13+
});
14+
15+
app.listen(port, () => {
16+
console.log(`App listening at http://localhost:${port}`);
17+
});

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "ghu2024sampleapp",
3+
"version": "1.0.0",
4+
"description": "Sample application for GitHub Universe 2024",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/OctopusSolutionsEngineering/GHU2024SampleApp.git"
12+
},
13+
"author": "",
14+
"license": "MIT",
15+
"bugs": {
16+
"url": "https://github.com/OctopusSolutionsEngineering/GHU2024SampleApp/issues"
17+
},
18+
"homepage": "https://github.com/OctopusSolutionsEngineering/GHU2024SampleApp#readme"
19+
}

0 commit comments

Comments
 (0)