Skip to content

Commit

Permalink
Build containers in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Oct 25, 2023
1 parent cc25d80 commit 46903a0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: containerised

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
server-base:
strategy:
matrix:
image-name: ["server-base", "secret-generation"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.image-name }}
push: ${{ github.event_name == 'push' && github.repository == 'DIRACGrid/container-images' && github.ref_name == 'main' }}
tags: ghcr.io/diracgrid/diracx/${{ matrix.image-name }}:latest
platforms: linux/amd64,linux/arm64

0 comments on commit 46903a0

Please sign in to comment.