Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
push:
branches:
- "main"
- "dev-build/*"
workflow_dispatch:
inputs:
workflow-id:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
merge-multiple: true
github-token: ${{ github.token }}
run-id: ${{ inputs.workflow-id }}
pattern: "!*.dockerbuild"

- name: List all artifacts
run: ls -l artifacts/
Expand Down
29 changes: 23 additions & 6 deletions .github/workflows/workflow-build-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ jobs:
os="${{ inputs.os }}"
os_version="${{ inputs.os-version }}"
arch="${{ inputs.arch }}"
binary_name="${{ steps.binary-name.outputs.name }}"
product="${{ inputs.product }}"
target="${{ inputs.target }}"

artifact_path="artifacts/${os}/${arch}/${binary_name}"
artifacts_path="artifacts/${os}/${arch}"

manifest="manifest_${product}_${os}_${arch}"
if [[ "${target}" != "" ]]; then
Expand All @@ -119,19 +118,36 @@ jobs:
{
echo "name=${os}"
echo "name-with-os-version=${name_with_os_version}"
echo "artifact-path=${artifact_path}"
echo "artifacts-path=${artifacts_path}"
echo "manifest-name=${manifest}"
} >> "$GITHUB_OUTPUT"

- name: Download otelcol-sumo artifact from workflow
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: ${{ steps.binary-name.outputs.name-with-platform }}
path: ${{ steps.platform.outputs.artifact-path }}
path: ${{ steps.platform.outputs.artifacts-path }}
repository: sumologic/sumologic-otel-collector
run-id: ${{ inputs.workflow-id }}
github-token: ${{ github.token }}

- name: Rename otelcol-sumo artifact
run: |
artifacts="${{ steps.platform.outputs.artifacts-path }}"
old="${{ steps.binary-name.outputs.name-with-platform }}"
new="${{ steps.binary-name.outputs.name }}"

mv "${artifacts}/${old}" "${artifacts}/${new}"

- name: Verify that artifact is a regular file
run: |
artifacts="${{ steps.platform.outputs.artifacts-path }}"
artifact="${artifacts}/${{ steps.binary-name.outputs.name }}"
if [ ! -f "${artifact}" ]; then
echo "Artifact is not a regular file: ${artifact}"
exit 1
fi

- name: Set image metadata
id: meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -186,14 +202,15 @@ jobs:
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to ECR
if: inputs.pull-request == false
uses: docker/login-action@v3
with:
registry: 663229565520.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Build (Local)
if: inputs.pull-request == 'true'
if: inputs.pull-request == true
id: build-local
uses: docker/bake-action@v6
with:
Expand All @@ -209,7 +226,7 @@ jobs:
*.tags=

- name: Build and push (ECR)
if: inputs.pull-request != 'true'
if: inputs.pull-request == false
id: build-ecr
uses: docker/bake-action@v6
with:
Expand Down
Loading