Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(release): properly push images in oci registries #2149

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build-drivers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout Sysdig
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download DriverKit
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@
with:
file: docker/sysdig/Dockerfile
context: .
tags: ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.BUILD_VERSION }}-draft
tags: ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.BUILD_VERSION }}-${{ matrix.platform }}-draft
push: true
provenance: false
build-args:
BUILD_VERSION=${{ env.BUILD_VERSION }}

Expand Down Expand Up @@ -215,10 +216,10 @@
run: printenv PRIVATE_KEY | gpg --import -

- name: Sign DEBs
run: debsigs --sign=origin --default-key="${{ env.KEY_ID }}" *.deb

Check warning on line 219 in .github/workflows/release-draft.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2035:info:1:57: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck] Raw Output: i:.github/workflows/release-draft.yaml:219:9: shellcheck reported issue in this script: SC2035:info:1:57: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck]

Check warning on line 219 in .github/workflows/release-draft.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2035:info:1:57: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck] Raw Output: i:.github/workflows/release-draft.yaml:219:9: shellcheck reported issue in this script: SC2035:info:1:57: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck]

- name: Sign RPMs
run: rpm --define "_gpg_name ${{ env.KEY_ID }}" --define "_binary_filedigest_algorithm 8" --addsign *.rpm

Check warning on line 222 in .github/workflows/release-draft.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2035:info:1:96: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck] Raw Output: i:.github/workflows/release-draft.yaml:222:9: shellcheck reported issue in this script: SC2035:info:1:96: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck]

Check warning on line 222 in .github/workflows/release-draft.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2035:info:1:96: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck] Raw Output: i:.github/workflows/release-draft.yaml:222:9: shellcheck reported issue in this script: SC2035:info:1:96: Use ./*glob* or -- *glob* so names with dashes won't become options [shellcheck]

- name: Upload Signed Packages
uses: actions/upload-artifact@v4
Expand Down
51 changes: 42 additions & 9 deletions .github/workflows/release-final.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,48 @@
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish final docker images
- name: Publish final docker images (amd64)
uses: akhilerm/tag-push-action@v2.0.0
with:
src: ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-draft
src: ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-amd64-draft
dst: |
${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}
${{ env.SYSDIG_IMAGE_BASE }}:latest
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest
${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-amd64
${{ env.SYSDIG_IMAGE_BASE }}:latest-amd64
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}-amd64
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest-amd64

- name: Publish final docker images (aarch64)
uses: akhilerm/tag-push-action@v2.0.0
with:
src: ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-aarch64-draft
dst: |
${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-aarch64
${{ env.SYSDIG_IMAGE_BASE }}:latest-aarch64
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}-aarch64
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest-aarch64

- name: Create latest manifest and push
run: |
docker manifest create \
${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }} \
--amend ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-amd64 \
--amend ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}-aarch64
docker manifest push ${{ env.SYSDIG_IMAGE_BASE }}:${{ env.RELEASE }}
docker manifest create \
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }} \
--amend ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}-amd64 \
--amend ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}-aarch64
docker manifest push ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:${{ env.RELEASE }}
docker manifest create \
${{ env.SYSDIG_IMAGE_BASE }}:latest \
--amend ${{ env.SYSDIG_IMAGE_BASE }}:latest-amd64 \
--amend ${{ env.SYSDIG_IMAGE_BASE }}:latest-aarch64
docker manifest push ${{ env.SYSDIG_IMAGE_BASE }}:latest
docker manifest create \
${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest \
--amend ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest-amd64 \
--amend ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest-aarch64
docker manifest push ${{ env.SYSDIG_DOCKERHUB_IMAGE_BASE }}:latest

release-rpm:
strategy:
Expand Down Expand Up @@ -83,12 +116,12 @@
./aws/install

- name: Checkout Sysdig
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sysdig

- name: Create directories
run: |

Check warning on line 124 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:124:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 124 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:124:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 124 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:124:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 124 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:124:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]
mkdir -p $REPOSITORY_DIR
mkdir -p $PACKAGES_DIR

Expand Down Expand Up @@ -149,12 +182,12 @@
sudo apt-get update && sudo apt-get -y install dpkg-dev gpg

- name: Checkout Sysdig
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sysdig

- name: Create directories
run: |

Check warning on line 190 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:190:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 190 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:190:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 190 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:190:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 190 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:190:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]
mkdir -p $REPOSITORY_DIR
mkdir -p $PACKAGES_DIR

Expand Down Expand Up @@ -210,12 +243,12 @@

steps:
- name: Checkout Sysdig
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: sysdig

- name: Create directories
run: |

Check warning on line 251 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:251:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 251 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:251:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 251 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:251:9: shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 251 in .github/workflows/release-final.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/release-final.yaml:251:9: shellcheck reported issue in this script: SC2086:info:2:10: Double quote to prevent globbing and word splitting [shellcheck]
mkdir -p $REPOSITORY_DIR
mkdir -p $PACKAGES_DIR

Expand Down
8 changes: 4 additions & 4 deletions docker/sysdig/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ FROM registry.access.redhat.com/ubi8/ubi

LABEL usage="docker run --rm -i -t --privileged --net=host -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /src:/src -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /etc:/host/etc:ro --name NAME IMAGE"

ARG BUILD_VERSION 0.1.1dev
ENV BUILD_VERSION ${BUILD_VERSION}
ARG BUILD_VERSION=0.1.1dev
ENV BUILD_VERSION=${BUILD_VERSION}

ENV HOST_ROOT /host
ENV HOME /root
ENV HOST_ROOT=/host
ENV HOME=/root

RUN yum -y install \
make \
Expand Down