Docker Edge #1267
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: Docker Edge | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '0 2 * * *' # run at 2 AM UTC | |
jobs: | |
build: | |
if: ${{ github.repository == 'redpanda-data/connect' || github.event_name != 'schedule' }} | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
packages: write | |
contents: read | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v4 | |
- name: Free up some disk space on ubuntu | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
# Workaround to provide additional free space for testing. | |
# https://github.com/actions/virtual-environments/issues/2840 | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: ${{ vars.RP_AWS_CRED_REGION }} | |
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }} | |
- name: Get secrets from AWS Secrets Manager | |
uses: aws-actions/aws-secretsmanager-get-secrets@v2 | |
with: | |
secret-ids: | | |
,sdlc/prod/github/dockerhub_token | |
parse-json-secrets: true | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: vectorizedbot | |
password: ${{ env.DOCKERHUB_TOKEN }} | |
- name: Install Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./resources/docker/Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: redpandadata/connect:edge | |
- name: Build and push cloud | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./resources/docker/Dockerfile.cloud | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: redpandadata/connect:edge-cloud | |
- name: Build and push CGO | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./resources/docker/Dockerfile.cgo | |
push: true | |
tags: redpandadata/connect:edge-cgo |