Skip to content

Commit a22718f

Browse files
hampfhBlytungdev
andcommitted
fix: Step instructions
Co-authored-by: Melvin Jakobsson <[email protected]>
1 parent 5f3e059 commit a22718f

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# Executable tutorial
2+
3+
docker build . -t executable-tutorial
4+
docker run -p 127.0.0.1:80:80/tcp -t executable-tutorial
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to ghcr.io
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
concurrency:
9+
group: deploy-${{ github.ref }} # This ensures all runs for a branch are grouped
10+
cancel-in-progress: true # Cancels any in-progress runs for this group
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Login to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.repository_owner }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build and push
29+
uses: docker/build-push-action@v6
30+
with:
31+
context: .
32+
platforms: linux/amd64
33+
push: true
34+
# github.repository_owner and github.repository are hardcoded
35+
tags: ghcr.io/<username>/<repo>:latest,ghcr.io/<username>/<repo>:${{ github.sha }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:20-alpine
2+
3+
WORKDIR /app
4+
5+
COPY package.json package-lock.json ./
6+
RUN npm install
7+
# Copy source files (in this case we only have one)
8+
COPY index.mjs ./index.mjs
9+
10+
EXPOSE 80
11+
12+
CMD [ "npm", "run", "start" ]

github-container-and-delivery/index.json

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"steps": [
1010
{
1111
"text": "step1.md"
12+
},
13+
{
14+
"text": "step2.md"
15+
},
16+
{
17+
"text": "step3.md",
18+
"verify": "step3.verify.sh"
1219
}
1320
],
1421
"assets": {

github-container-and-delivery/step3.verify.sh

Whitespace-only changes.

0 commit comments

Comments
 (0)