Skip to content

Commit

Permalink
Add containerized prebuilt toolchains (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-rod committed Jan 27, 2024
1 parent 97e4dcd commit 9ea3265
Show file tree
Hide file tree
Showing 6 changed files with 807 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Container

on:
release:
types: [published]
workflow_dispatch: {}

env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
container:
runs-on: ubuntu-latest

strategy:
matrix:
tc: [kindle, kindle5, kindlepw2, kobo, nickel, remarkable, cervantes, pocketbook, bookeen]

steps:
- name: Check out Git repository
id: checkout-repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Log into GHCR
id: ghcr-login
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Get latest release
id: get-release
uses: octokit/request-action@v2.x
with:
route: GET /repos/{owner}/{repo}/releases/latest
owner: koreader
repo: koxtoolchain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build images
id: build-images
run: ./buildah-koxtoolchain.sh ${{ matrix.tc }} ${{ fromJson(steps.get-release.outputs.data).tag_name }}

- name: Push to ghcr.io
id: push-ghcr
uses: redhat-actions/push-to-registry@v2
with:
registry: ghcr.io/${{ github.repository_owner }}
image: ${{ github.event.repository.name }}
tags: ${{ matrix.tc }}-latest ${{ matrix.tc }}-${{ fromJson(steps.get-release.outputs.data).tag_name }}
extra-args: |
--disable-content-trust
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ cscope.*
.*.swo
tags
build
.idea
Loading

0 comments on commit 9ea3265

Please sign in to comment.