Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build and push - part 1 #56

Open
wants to merge 79 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
491c51c
merge test 1
magick93 Nov 25, 2024
4655e8a
update pr
magick93 Nov 25, 2024
855d735
disable jobs
magick93 Nov 25, 2024
e5f98f6
Merge pull request #1 from magick93/pr_test_1
magick93 Nov 25, 2024
bea39a1
branch check
magick93 Nov 25, 2024
4f2dc68
Merge pull request #3 from magick93/pr_test_1
magick93 Nov 25, 2024
72409c0
check when merging to stable
magick93 Nov 25, 2024
51b7443
attempt to use hcv
magick93 Nov 26, 2024
6d6a70f
Merge branch 'Allow-merge-to-stable-when-required-#52' into unstable
magick93 Nov 26, 2024
36e937b
tmp comment out
magick93 Nov 26, 2024
ca2ff87
Merge pull request #2 from magick93/unstable
magick93 Nov 26, 2024
1838ec7
tmp rm CROSS_FEATURES
magick93 Nov 26, 2024
d509ae3
Merge pull request #5 from magick93/unstable
magick93 Nov 26, 2024
229740b
upgrade
magick93 Nov 26, 2024
cde21a8
simplify
magick93 Nov 26, 2024
77342f4
Merge pull request #6 from magick93/unstable
magick93 Nov 26, 2024
03c689b
use GH_TOKEN
magick93 Nov 26, 2024
6080495
Merge pull request #7 from magick93/unstable
magick93 Nov 26, 2024
2b98998
hardcode docker repo, set dockerfile location
magick93 Nov 26, 2024
fe27047
Merge pull request #8 from magick93/unstable
magick93 Nov 26, 2024
cb96e77
use correct dir
magick93 Nov 26, 2024
55145ee
Merge pull request #9 from magick93/unstable
magick93 Nov 26, 2024
eb2d461
update rust and path
magick93 Nov 26, 2024
a97b785
Merge pull request #10 from magick93/unstable
magick93 Nov 26, 2024
33f3a57
use Cargo.toml as source of truth
magick93 Nov 26, 2024
0fc6e37
Merge pull request #11 from magick93/unstable
magick93 Nov 26, 2024
3867484
fix path for toml_reader.sh
magick93 Nov 26, 2024
5249158
Merge pull request #12 from magick93/unstable
magick93 Nov 26, 2024
e508fa1
debugging
magick93 Nov 26, 2024
27b7155
Merge pull request #13 from magick93/unstable
magick93 Nov 26, 2024
0890343
corrected path
magick93 Nov 26, 2024
145ffae
Merge pull request #14 from magick93/unstable
magick93 Nov 26, 2024
ef2e799
debugging
magick93 Nov 26, 2024
89d32f9
Merge pull request #15 from magick93/unstable
magick93 Nov 26, 2024
35b5db9
use after actions/checkout@v4
magick93 Nov 26, 2024
ee9e8ff
Merge pull request #16 from magick93/unstable
magick93 Nov 26, 2024
71351c2
re-correcting dir
magick93 Nov 26, 2024
294d38d
Merge pull request #17 from magick93/unstable
magick93 Nov 26, 2024
5471473
assign rust version to GH_ENV
magick93 Nov 26, 2024
49de973
Merge pull request #18 from magick93/unstable
magick93 Nov 26, 2024
e8a62a6
remove test docker org
magick93 Nov 26, 2024
6909c5b
Merge pull request #19 from magick93/unstable
magick93 Nov 26, 2024
195d947
re-enable check-code
magick93 Nov 26, 2024
3d83330
rm temp file
magick93 Nov 26, 2024
7a0a0c5
Merge pull request #20 from magick93/docker_build_push_part1
magick93 Nov 27, 2024
f748823
update futures
magick93 Nov 27, 2024
732ed01
tmp workaround for remaining audit error
magick93 Nov 27, 2024
cf3a494
Merge pull request #22 from magick93/docker_build_push_part1
magick93 Nov 27, 2024
e919c3f
Merge pull request #21 from magick93/unstable
magick93 Nov 27, 2024
5e0d751
update hcv path
magick93 Nov 27, 2024
c941ab0
Merge pull request #23 from magick93/docker_build_push_part1
magick93 Nov 27, 2024
cd202e6
Merge pull request #24 from magick93/unstable
magick93 Nov 27, 2024
6a57a37
try another hcv path
magick93 Nov 27, 2024
d80a030
Merge pull request #25 from magick93/docker_build_push_part1
magick93 Nov 27, 2024
52c370d
Merge pull request #26 from magick93/unstable
magick93 Nov 27, 2024
43bd52e
Merge branch 'unstable' into stable
magick93 Nov 27, 2024
e615120
Add extract-version workflow and refactor docker workflow to use it
magick93 Nov 27, 2024
09fd733
Merge pull request #27 from magick93/reusable_workflows
magick93 Nov 27, 2024
6727dc4
Merge pull request #28 from magick93/unstable
magick93 Nov 27, 2024
2d98a2d
Refactor Docker workflow to support single and multi-architecture builds
magick93 Nov 27, 2024
9533df2
Enhance extract-version workflow to default to 'latest' and add debug…
magick93 Dec 1, 2024
ae91231
Refactor Docker workflow to improve architecture support and add debu…
magick93 Dec 3, 2024
83fa758
Merge pull request #29 from magick93/releases-from-docker
magick93 Dec 3, 2024
135890f
Merge pull request #30 from magick93/unstable
magick93 Dec 3, 2024
fee33f8
Refactor Docker workflow to enable multi-architecture builds and stre…
magick93 Dec 3, 2024
66ebb3b
Merge pull request #31 from magick93/releases-from-docker
magick93 Dec 3, 2024
75be9e3
Merge pull request #32 from magick93/unstable
magick93 Dec 3, 2024
bd2240d
rm jemalloc
magick93 Dec 3, 2024
11ee356
Merge pull request #33 from magick93/releases-from-docker
magick93 Dec 3, 2024
9d0a233
Merge pull request #34 from magick93/unstable
magick93 Dec 3, 2024
4c4c454
try with TARGETPLATFORM arg
magick93 Dec 3, 2024
8e71ed7
Merge pull request #35 from magick93/releases-from-docker
magick93 Dec 3, 2024
1f98a14
Merge pull request #36 from magick93/unstable
magick93 Dec 3, 2024
80fe1cd
Update Docker workflow to include architecture-specific tags and enab…
magick93 Dec 3, 2024
e773475
Merge pull request #37 from magick93/releases-from-docker
magick93 Dec 3, 2024
1cfb88b
Merge pull request #38 from magick93/unstable
magick93 Dec 3, 2024
ed1b6f6
disable buildx imagetools, add labels
magick93 Dec 3, 2024
0848426
Merge pull request #39 from magick93/releases-from-docker
magick93 Dec 3, 2024
61981ff
Merge pull request #40 from magick93/unstable
magick93 Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/scripts/toml_reader.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

# TOML Reader - A script to read values from simple TOML files
# Usage: ./toml_reader.sh <file_path> <section> <key>

get_section() {
# Function to get the section from a TOML file
# Parameters:
# $1 - TOML file path
# $2 - section name
local file="$1"
local section="$2"

sed -n "/^\[$section\]/,/^\[/p" "$file" | sed '$d'
}

get_toml_value() {
# Function to get a value from a TOML file
# Parameters:
# $1 - TOML file path
# $2 - section
# $3 - key
local file="$1"
local section="$2"
local key="$3"

get_section "$file" "$section" | grep "^$key " | cut -d "=" -f2- | tr -d ' "'
}

# Show usage if script is called directly
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
if [ "$#" -ne 3 ]; then
echo "Error: Incorrect number of arguments"
echo "Usage: $0 <file_path> <section> <key>"
echo "Example: $0 ./config.toml server_b domain"
exit 1
fi

# Check if file exists
if [ ! -f "$1" ]; then
echo "Error: File '$1' does not exist"
exit 1
fi

# Get the value
result=$(get_toml_value "$1" "$2" "$3")

# Check if value was found
if [ -z "$result" ]; then
echo "Error: No value found for section '[$2]' and key '$3'"
exit 1
fi

echo "$result"
fi
56 changes: 28 additions & 28 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: mdbook
# name: mdbook

on:
push:
branches:
- unstable
# on:
# push:
# branches:
# - unstable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
build-and-upload-to-s3:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
# jobs:
# build-and-upload-to-s3:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'

- run: mdbook build
working-directory: book
# - run: mdbook build
# working-directory: book

- uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-southeast-2'
SOURCE_DIR: 'book/book'
# - uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
# with:
# args: --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: 'ap-southeast-2'
# SOURCE_DIR: 'book/book'
Loading