Skip to content

Commit

Permalink
Fix execution of GitHub workflow
Browse files Browse the repository at this point in the history
- switch to organization & activation key
- use docker/build-push-action including the ability to pass secrets
  • Loading branch information
sbesson committed Sep 27, 2023
1 parent 8c79a58 commit 933e2ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: ./build.sh
uses: docker/build-push-action@v5
with:
context: .
tags: builder
load: true
secrets: |
redhat_org=${{ secrets.REDHAT_ORG }}
- name: Run
run: |
patch -p1 -d ice < 0001-OpenSSL-3.0-build-See-zeroc-ice-ice-1320.patch
mkdir dist
docker run --rm -e CPPFLAGS='-Wno-error=deprecated-declarations -Wno-error=unused-result -Wno-error=register' -v $PWD/dist:/opt -v $PWD/ice:/build builder /bin/bash -c "cd /build/cpp ; make install"
cd dist
tar zcf Ice-3.6.5-rockylinux9-x86_64.tar.gz Ice-3.6.5
tar zcf Ice-3.6.5-rhel9-x86_64.tar.gz Ice-3.6.5
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
FROM redhat/ubi9

ENV SMDEV_CONTAINER_OFF=1
ARG REDHAT_USERNAME
ARG REDHAT_PASSWORD

RUN subscription-manager register --username $REDHAT_USERNAME --password $REDHAT_PASSWORD --auto-attach
RUN --mount=type=secret,id=redhat_org subscription-manager register --org $(cat /run/secrets/redhat_org) --activationkey Ice
RUN subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms

RUN dnf update -y
Expand Down

0 comments on commit 933e2ea

Please sign in to comment.