Skip to content

Commit 7f426f6

Browse files
authored
Initial commit
0 parents  commit 7f426f6

File tree

5 files changed

+104
-0
lines changed

5 files changed

+104
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Publish new image
2+
run-name: Publish new image of rollouts binary
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
permissions:
9+
packages: write
10+
attestations: write
11+
contents: read
12+
id-token: write
13+
pull-requests: write
14+
15+
env:
16+
REGISTRY: ghcr.io
17+
IMAGE_NAME: ${{ github.repository }}
18+
19+
jobs:
20+
publish:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
- name: Log in to GitHub Container Registry
28+
uses: docker/login-action@v2
29+
with:
30+
registry: ${{ env.REGISTRY }}
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v4
35+
id: push
36+
with:
37+
push: true
38+
tags: |
39+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:${{ github.run_number }}
40+
- name: Generate artifact attestation
41+
uses: actions/attest-build-provenance@v3
42+
with:
43+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
44+
subject-digest: ${{ steps.push.outputs.digest }}
45+
push-to-registry: true
46+
cleanup:
47+
name: ghcr.io cleanup action
48+
runs-on: ubuntu-latest
49+
permissions:
50+
packages: write
51+
steps:
52+
- uses: dataaxiom/ghcr-cleanup-action@v1
53+
with:
54+
keep-n-tagged: 5
55+
delete-ghost-images: true
56+
delete-orphaned-images: true
57+
delete-untagged: true
58+
packages: ${{ env.IMAGE_NAME}}

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Use the lightweight Nginx Alpine image as the base
2+
FROM nginx:stable-alpine
3+
4+
# Copy your static files into the default Nginx web root directory
5+
COPY . /usr/share/nginx/html

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# App Team Template
2+
3+
This directory is the "golden" template for app teams using XYZ language at ACME inc.
4+
5+
6+
## Required Setup
7+
8+
- Your repo must be named `sedemo-app-...`
9+
- Once created, you will need to edit `platform/app-values.yaml` to your needs.

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
5+
</head>
6+
<body>
7+
<h1>Hello, Akuity!</h1>
8+
<p>This is a lightweight static website.</p>
9+
</body>
10+
</html>

platform/app-values.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
project:
2+
group: <name of AD group>
3+
4+
image:
5+
# If using default workflow, this will be set to ghcr.io/<github_org>/<repo_name>
6+
repository: registry/imagename
7+
# Default use of this ghcr publishing workflow will use incrmental build number as tag
8+
selectionStrategy: Lexical
9+
# if useing digest stragey, uncomment next line and comment tagRegex line
10+
#tag: latest
11+
tagRegex: '^\d*$'
12+
containerPort: 80
13+
memoryLimit: 64Mi
14+
cpuLimit: 1m
15+
ingress:
16+
custom_prefix: changeme
17+
18+
rollouts:
19+
enabled: true
20+
21+
environments:
22+
staging: true

0 commit comments

Comments
 (0)