Skip to content

Commit

Permalink
add automated build for component container (#1)
Browse files Browse the repository at this point in the history
* add automated build for component container

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Jun 21, 2023
1 parent 611bc2d commit 09fa08d
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: flux-operator-component container build
on:
# This must be triggered manually
workflow_dispatch:

# If you dare test for a PR
# This will take ~4 hours 25 minutes
pull_request: []
push:
branches:
- main

env:
container: ghcr.io/converged-computing/flux-operator-component

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
fail-fast: false

# In case in the future we want different arches?
matrix:
platform:
- [linux, latest]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.container }}

- name: Make Space For Build
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.platform[0] }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login GitHub packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: build
uses: docker/build-push-action@v3
with:
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ matrix.platform[0] }}
tags: |
${{ env.container }}:${{ matrix.platform[1] }}

0 comments on commit 09fa08d

Please sign in to comment.