Skip to content

Commit

Permalink
Add devel workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Jul 23, 2024
1 parent 1178c3f commit 606d0c6
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/devel-buildah-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build Autoware devel container images using Buildah
on:
workflow_dispatch:
workflow_run:
workflows: [Run Tests]
types:
- completed
push:
paths:
- .github/workflows/devel-buildah-build.yml # Self-trigger

env:
REGISTRY: ghcr.io/bounverif
IMAGE_NAME: autoware
AUTOWARE_VERSION: latest
CONTAINERS_ROOT: /home/runner/.local/share/containers
TMPDIR: /home/runner/.local/share/containers/tmp

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

permissions:
contents: read
packages: write

jobs:
autoware-devel-build:
runs-on: ubuntu-24.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 2048 # Reserve disk space for repository
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
build-mount-path: ${{ env.CONTAINERS_ROOT }} # The remaining space only for container build

- run: mkdir -p $TMPDIR

- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the GitHub Container registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build devel container image
id: build-devel
uses: redhat-actions/buildah-build@v2
with:
platforms: linux/amd64
image: ${{ env.IMAGE_NAME }}
tags: latest-devel
layers: true
oci: true
extra-args:
--target autoware-devel
containerfiles: |
containers/autoware-devel/Dockerfile
- name: Push to GitHub Container Repository
id: push-devel-ghcr
uses: redhat-actions/push-to-registry@v2
with:
registry: ${{ env.REGISTRY }}
image: ${{ steps.build-devel.outputs.image }}
tags: ${{ steps.build-devel.outputs.tags }}

0 comments on commit 606d0c6

Please sign in to comment.