Skip to content

Commit

Permalink
GH Action related changes
Browse files Browse the repository at this point in the history
- Fix typo
- Align ghaction with new container images and paths
  • Loading branch information
jnasselle committed May 31, 2023
1 parent 71ffcb8 commit ac8184e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/upload-deb-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image: [ {CONTAINER_NAME: deb_builder_amd64, DOCKERFILE_PATH: debs/Debian/amd64}, {CONTAINER_NAME: deb_builder_i386, DOCKERFILE_PATH: debs/Debian/i386}]
image: [ {CONTAINER_NAME: deb_manager_builder_amd64, DOCKERFILE_PATH: debs/Debian/8/amd64}, {CONTAINER_NAME: deb_agent_builder_amd64, DOCKERFILE_PATH: debs/Debian/7/amd64}, {CONTAINER_NAME: deb_builder_i386, DOCKERFILE_PATH: debs/Debian/7/i386}]
fail-fast: false
steps:
- name: Cancel previous runs
Expand All @@ -33,10 +33,13 @@ jobs:
with:
filters: |
i386:
- 'debs/Debian/i386/**'
- 'debs/Debian/7/i386/**'
- 'debs/build.sh'
amd64:
- 'debs/Debian/amd64/**'
manager_amd64:
- 'debs/Debian/8/amd64/**'
- 'debs/build.sh'
agent_amd64:
- 'debs/Debian/7/amd64/**'
- 'debs/build.sh'
- name: Copy build.sh to Dockerfile path
Expand All @@ -48,7 +51,7 @@ jobs:
if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi

- name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry
if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.image.CONTAINER_NAME == 'deb_builder_amd64' )
if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.manager_amd64 == 'true' && matrix.image.CONTAINER_NAME == 'deb_manager_builder_amd64') || ( steps.changes.outputs.agent_amd64 == 'true' && matrix.image.CONTAINER_NAME == 'deb_agent_builder_amd64' )
run:
bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/upload-rpm-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}]
image: [ {CONTAINER_NAME: rpm_manager_builder_x86, DOCKERFILE_PATH: rpms/CentOS/7/x86_64}, {CONTAINER_NAME: rpm_agent_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}]
fail-fast: false
steps:
- name: Cancel previous runs
Expand All @@ -35,7 +35,10 @@ jobs:
i386:
- 'rpms/CentOS/6/i386/**'
- 'rpms/build.sh'
x86_64:
manager_x86_64:
- 'rpms/CentOS/7/x86_64/**'
- 'rpms/build.sh'
agent_x86_64:
- 'rpms/CentOS/6/x86_64/**'
- 'rpms/build.sh'
Expand All @@ -48,7 +51,7 @@ jobs:
if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi

- name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry
if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.x86_64 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_builder_x86' )
if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.manager_x86_64 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_manager_builder_x86' ) || ( steps.changes.outputs.agent_x86_64 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_agent_builder_x86' )
run:
bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}

Expand Down
2 changes: 1 addition & 1 deletion debs/generate_debian_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DEB_AGENT_ARMHF_BUILDER="deb_builder_armhf"
DEB_MANAGER_AMD64_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/8/amd64"
DEB_AGENT_AMD64_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/7/amd64"
DEB_ARM64_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/9/arm64"
DEB_I386_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/8/i386"
DEB_I386_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/7/i386"
DEB_PPC64LE_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/9/ppc64le"
DEB_ARMHF_BUILDER_DOCKERFILE="${CURRENT_PATH}/Debian/9/armhf"
CHECKSUMDIR=""
Expand Down

0 comments on commit ac8184e

Please sign in to comment.