Skip to content

Commit

Permalink
Update GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Dec 26, 2024
1 parent 8dd6cce commit 0fa90db
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/buildroot-host.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Buildroot Host
name: Buildroot Self-Hosted
on: [workflow_dispatch]
jobs:
build-toolchain:
name: Build Toolchain for Buildroot
build:
name: Build
strategy:
matrix:
config: ["arm64", "armv7", "armv6", "armv5", "x86_64", "i386", "ppc64le"]
runs-on: [linux, x64]
runs-on: [self-hosted, linux, x64]
container: colemancda/buildroot-swift
steps:
- name: Checkout
Expand All @@ -17,13 +17,8 @@ jobs:
run: |
export SWIFT_BUILDROOT=$GITHUB_WORKSPACE
export SWIFT_TARGET_ARCH=${{ matrix.config }}
tar -xvf ./host-tools.tar.gz
$SWIFT_BUILDROOT/.devcontainer/build-scripts/download-buildroot.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/configure.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/fetch-sources.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-host-tools.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-host-swift.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-toolchain.sh
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build.sh
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
54 changes: 25 additions & 29 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
name: Publish Docker image

name: Docker
on: [workflow_dispatch]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .devcontainer
file: ./.devcontainer/Dockerfile
push: true
tags: latest
publish:
name: Build and Publish Docker image
strategy:
matrix:
arch: ["arm64", "armv7", "armv6", "armv5", "x86_64", "i386", "ppc64le"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate Docker
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build
run: |
export SWIFT_BUILDROOT=$GITHUB_WORKSPACE
export SWIFT_TARGET_ARCH=${{ matrix.arch }}
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-docker.sh
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.arch }}
path: ./output/${{ matrix.arch }}/images

0 comments on commit 0fa90db

Please sign in to comment.