-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e64519
commit 46349e0
Showing
8 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: build-go | ||
|
||
on: | ||
push: | ||
paths: | ||
- "go/*.go" | ||
- "go/go.mod" | ||
- "go/go.sum" | ||
- ".github/workflows/build-go.yml" | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- labeled | ||
- reopened | ||
paths: | ||
- "go/*.go" | ||
- "go/go.mod" | ||
- "go/go.sum" | ||
- ".github/workflows/build-go.yml" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
build-go: | ||
name: build-go | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build binary | ||
run: | | ||
cd go | ||
go build -o ../hello . | ||
- name: Smoke test | ||
run: | | ||
./hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: check-python | ||
|
||
on: | ||
push: | ||
paths: | ||
- "requirements.txt" | ||
- ".github/workflows/check-python.yml" | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- labeled | ||
- reopened | ||
paths: | ||
- "requirements.txt" | ||
- ".github/workflows/check-python.yml" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
check-python: | ||
name: check-python | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
run: | | ||
pip install --requirement requirements.txt | ||
- name: Smoke test | ||
run: | | ||
cowsay --help | ||
pyfiglet --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: docker-build | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "renovate/**" | ||
paths: | ||
- "ubuntu/22.04/**" | ||
- ".github/workflows/docker-build.yml" | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- labeled | ||
- reopened | ||
paths: | ||
- "ubuntu/22.04/**" | ||
- ".github/workflows/docker-build.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: docker-build | ||
permissions: | ||
packages: write | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_TAG: 22.04 | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ubuntu/22.04 | ||
platforms: linux/amd64 | ||
provenance: false | ||
sbom: false | ||
cache-from: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/nicholasdille/clc23-renovate-demo | ||
|
||
go 1.20 | ||
|
||
require github.com/TwiN/go-color v1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/TwiN/go-color v1.4.0 h1:fNbOwOrvup5oj934UragnW0B1WKaAkkB85q19Y7h4ng= | ||
github.com/TwiN/go-color v1.4.0/go.mod h1:0QTVEPlu+AoCyTrho7bXbVkrCkVpdQr7YF7PYWEtSxM= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/TwiN/go-color" | ||
) | ||
|
||
var Author string = "unknown" | ||
var Version string = "none" | ||
|
||
func main() { | ||
println(color.InGreen("hello world")) | ||
fmt.Printf("by %s, version %s", Author, Version) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cowsay==5.0 | ||
pyfiglet==1.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#syntax=docker/dockerfile:1.6.0 | ||
|
||
FROM ubuntu:22.04 AS base | ||
|
||
SHELL [ "bash", "-o", "errexit", "-c"] | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY <<no-recommends <<no-suggests /etc/apt/apt.conf.d/ | ||
APT::Install-Recommends "false"; | ||
no-recommends | ||
APT::Install-Suggests "false"; | ||
no-suggests | ||
|
||
RUN <<EOF | ||
grep security /etc/apt/sources.list >/etc/apt/sources.list.d/security.list | ||
apt-get update -o Dir::Etc::SourceList=/etc/apt/false -o Dir::Etc::SourceParts=/etc/apt/sources.list.d | ||
apt-get upgrade -y | ||
rm -f /etc/apt/sources.list.d/security.list | ||
EOF | ||
|
||
ARG ref=main | ||
LABEL org.opencontainers.image.source="https://github.com/nicholasdille/clc23-renovate-demo" \ | ||
org.opencontainers.image.title="Ubuntu" \ | ||
org.opencontainers.image.description="Base image for Ubuntu" |