This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
ci: test Dockerfile from tserong/s3gw/wip-base-bci-15.5 #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and Push S3GW Image | |
on: | |
pull_request_target: | |
branches: | |
- "s3gw" | |
types: [labeled] | |
workflow_dispatch: | |
env: | |
# Note: max 128 chars according to OCI Distribution Spec | |
IMAGE_TAG: pr-${{ github.workflow_sha }}-${{ github.run_id }}-${{ github.run_attempt }} | |
jobs: | |
build: | |
if: github.event.label.name == 'ci/build-s3gw-image' || github.event_name == 'workflow_dispatch' | |
runs-on: self-hosted | |
steps: | |
- name: Checkout s3gw | |
uses: actions/checkout@v3 | |
with: | |
repository: aquarist-labs/s3gw | |
path: s3gw | |
submodules: false | |
- name: Checkout ceph | |
uses: actions/checkout@v3 | |
with: | |
path: s3gw/ceph | |
submodules: recursive | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Context | |
run: | | |
docker context create builder | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
endpoint: builder | |
- name: quay.io Login | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build Container Image | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
build-args: | | |
CMAKE_BUILD_TYPE=Release | |
S3GW_VERSION=${{ env.IMAGE_TAG }} | |
NPROC=16 | |
QUAY_EXPIRATION=1w | |
tags: | | |
quay.io/s3gw/s3gw:${{ env.IMAGE_TAG }} | |
file: s3gw/Dockerfile | |
context: s3gw | |
- name: Add comment to image URL and image:tag | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '📦 quay.io/s3gw/s3gw:${{ env.IMAGE_TAG }} https://quay.io/repository/s3gw/s3gw?tab=tags&tag=${{ env.IMAGE_TAG }}' | |
}) |