Skip to content

Commit

Permalink
add build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
derpsteb committed Oct 27, 2023
1 parent 37a0a14 commit fc2cce3
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/actions/build_mint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build mint container
description: "Build and upload the mint container used during s3proxy e2e tests."

inputs:
version:
description: "Version to use for the new mint image"
required: true
username:
description: "Username to use for logging in to the container registry"
required: true
password:
description: "Password to use for logging in to the container registry"
required: true

outputs:
mintImage:
description: "Name and tag of the image that was built and pushed"
value: ghcr.io/edgelesssys/constellation/mint:${{ inputs.version }}

runs:
using: "composite"
steps:
- name: Log in to the Container registry
uses: ./.github/actions/container_registry_login
with:
registry: ghcr.io
username: ${{ inputs.username }}
password: ${{ inputs.password }}

- name: Build and push container image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
with:
context: ./s3proxy/e2e/mint
file: ./s3proxy/e2e/mint/Dockerfile
push: true
tags: |
ghcr.io/edgelesssys/constellation/mint:${{ inputs.version }}
40 changes: 40 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: E2E Test s3proxy

on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'


jobs:
build:
name: Build docker image
runs-on: ubuntu-22.04
permissions:
id-token: write
checks: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: Set env
id: set-version
run: echo "release_version=${GITHUB_REF#refs/*/}" | tee -a $GITHUB_OUTPUT

- name: Log in to the Container registry
uses: ./.github/actions/container_registry_login
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build mint
id: mintbuild
uses: ./.github/actions/build_mint
with:
version: ${{ steps.set-version.outputs.release_version }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fc2cce3

Please sign in to comment.