Skip to content

Commit

Permalink
ci: Move from Drone to GitHub Actions for CI
Browse files Browse the repository at this point in the history
Move the building and publishing of the OCI images in this repository
from Drone to GitHub Actions. We are turning down Drone.
  • Loading branch information
camscale committed Nov 27, 2023
1 parent 05bc58f commit fa9e214
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 98 deletions.
95 changes: 0 additions & 95 deletions .drone.yml

This file was deleted.

52 changes: 49 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,55 @@
name: Build FPM Images
on:
workflow_dispatch:
inputs:
version:
description: The version to use in the image label
required: true
type: string
push:
tags: [ '*' ]

jobs:
dummy:
build:
strategy:
matrix:
include:
- directory: centos/8
image: fpm-centos:8
- directory: debian/12
image: fpm-debian:12
runs-on: ubuntu-latest
steps:
- name: Greeting
run: echo "This is a dummy build to placate GitHub."
- name: version
env:
VERSION: ${{ inputs.version }}
REF_NAME: ${{ github.ref_name }}
run: |
V="${VERSION:-${REF_NAME}}"
if [[ -z "$V" ]]; then
echo "No version or ref_name set" >&2
exit 1
fi
echo "V=$V" >> "$GITHUB_ENV"
- name: Assume AWS ECR Push Role
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::146628656107:role/fpm-oci-tag-build-gha
role-session-name: "gha-fpm-build=${{ github.run_number }}"
role-duration-seconds: 900
- name: Log into ECR
uses: docker/login-action@v3
with:
registry: public.ecr.aws
env:
AWS_REGION: us-east-1
- name: Build FPM Image
uses: docker/build-push-action@v3
with:
push: true
context: ${{ matrix.directory }}
dockerfile: ${{ matrix.directory }}/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
public.ecr.aws/gravitational/${{ matrix.image }}-${{ env.V }}

0 comments on commit fa9e214

Please sign in to comment.