Skip to content

Commit

Permalink
remove upload artifacts because of the disk space issue
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed May 27, 2024
1 parent 91bacbb commit 70851bc
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 113 deletions.
118 changes: 70 additions & 48 deletions .github/actions/docker-build-and-push-openadkit/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ runs:
${{ inputs.bake-images }}
set: |
${{ inputs.build-args }}
- name: Build and Save Artifacts
- name: Build only
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
uses: docker/bake-action@v3
with:
Expand All @@ -121,53 +121,75 @@ runs:
provenance: false
targets: |
${{ inputs.bake-images }}
set: |
${{ inputs.build-args }}
planning-control.output=type=docker,dest=/tmp/planning-control.tar
visualizer.output=type=docker,dest=/tmp/visualizer.tar
simulator.output=type=docker,dest=/tmp/simulator.tar
- name: Upload Artifact - planning-control
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-planning-control
uses: actions/upload-artifact@v4
with:
name: planning-control-image${{ inputs.tag-suffix }}
path: /tmp/planning-control.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Upload Artifact - visualizer
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-visualizer
uses: actions/upload-artifact@v4
with:
name: visualizer-image${{ inputs.tag-suffix }}
path: /tmp/visualizer.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Upload Artifact - simulator
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-simulator
uses: actions/upload-artifact@v4
with:
name: simulator-image${{ inputs.tag-suffix }}
path: /tmp/simulator.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Output artifact URLs
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: output-artifact-urls
id: warn-no-artifacts
run: |
echo 'planning-control URL ${{ steps.artifact-upload-step-planning-control.outputs.artifact-url }}'
echo 'visualizer URL ${{ steps.artifact-upload-step-visualizer.outputs.artifact-url }}'
echo 'simulator URL ${{ steps.artifact-upload-step-simulator.outputs.artifact-url }}'
echo 'No artifacts uploaded because of disk space issue'
shell: bash

# TODO:Enable after solving the issue with the disk space
# - name: Build and Save Artifacts
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# uses: docker/bake-action@v3
# with:
# push: false
# files: |
# docker/${{ inputs.bake-target }}/docker-bake.hcl
# ${{ steps.meta-planning-control.outputs.bake-file }}
# ${{ steps.meta-visualizer.outputs.bake-file }}
# ${{ steps.meta-simulator.outputs.bake-file }}
# provenance: false
# targets: |
# ${{ inputs.bake-images }}
# set: |
# ${{ inputs.build-args }}
# planning-control.output=type=docker,dest=/tmp/planning-control.tar
# visualizer.output=type=docker,dest=/tmp/visualizer.tar
# simulator.output=type=docker,dest=/tmp/simulator.tar

# - name: Upload Artifact - planning-control
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-planning-control
# uses: actions/upload-artifact@v4
# with:
# name: planning-control-image${{ inputs.tag-suffix }}
# path: /tmp/planning-control.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Upload Artifact - visualizer
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-visualizer
# uses: actions/upload-artifact@v4
# with:
# name: visualizer-image${{ inputs.tag-suffix }}
# path: /tmp/visualizer.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Upload Artifact - simulator
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-simulator
# uses: actions/upload-artifact@v4
# with:
# name: simulator-image${{ inputs.tag-suffix }}
# path: /tmp/simulator.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Output artifact URLs
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: output-artifact-urls
# run: |
# echo 'planning-control URL ${{ steps.artifact-upload-step-planning-control.outputs.artifact-url }}'
# echo 'visualizer URL ${{ steps.artifact-upload-step-visualizer.outputs.artifact-url }}'
# echo 'simulator URL ${{ steps.artifact-upload-step-simulator.outputs.artifact-url }}'
# shell: bash
153 changes: 88 additions & 65 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ runs:
${{ inputs.bake-images }}
set: |
${{ inputs.build-args }}
- name: Build and Save Artifacts
- name: Build Only
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
uses: docker/bake-action@v3
with:
Expand All @@ -133,71 +133,94 @@ runs:
provenance: false
targets: |
${{ inputs.bake-images }}
set: |
${{ inputs.build-args }}
prebuilt.output=type=docker,dest=/tmp/prebuilt.tar
devel.output=type=docker,dest=/tmp/devel.tar
runtime.output=type=docker,dest=/tmp/runtime.tar
- name: Upload Artifact - prebuilt
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-prebuilt
uses: actions/upload-artifact@v4
with:
name: prebuilt-image${{ inputs.tag-suffix }}
path: /tmp/prebuilt.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Remove tar file - prebuilt
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
run: |
rm /tmp/prebuilt.tar
shell: bash

- name: Upload Artifact - devel
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-devel
uses: actions/upload-artifact@v4
with:
name: devel-image${{ inputs.tag-suffix }}
path: /tmp/devel.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Remove tar file - devel
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
run: |
rm /tmp/devel.tar
shell: bash

- name: Upload Artifact - runtime
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-runtime
uses: actions/upload-artifact@v4
with:
name: runtime-image${{ inputs.tag-suffix }}
path: /tmp/runtime.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: warn

- name: Remove tar file - runtime
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
run: |
rm /tmp/runtime.tar
shell: bash
- name: Output artifact URLs
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: output-artifact-urls
id: warn-no-artifacts
run: |
echo 'prebuilt URL ${{ steps.artifact-upload-step-prebuilt.outputs.artifact-url }}'
echo 'devel URL ${{ steps.artifact-upload-step-devel.outputs.artifact-url }}'
echo 'runtime URL ${{ steps.artifact-upload-step-runtime.outputs.artifact-url }}'
echo 'No artifacts uploaded because of disk space issue'
shell: bash

# TODO:Enable after solving the issue with the disk space
# - name: Build and Save Artifacts
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# uses: docker/bake-action@v3
# with:
# push: false
# files: |
# docker/docker-bake.hcl
# ${{ steps.meta-base.outputs.bake-file }}
# ${{ steps.meta-prebuilt.outputs.bake-file }}
# ${{ steps.meta-devel.outputs.bake-file }}
# ${{ steps.meta-runtime.outputs.bake-file }}
# provenance: false
# targets: |
# ${{ inputs.bake-images }}
# set: |
# ${{ inputs.build-args }}
# prebuilt.output=type=docker,dest=/tmp/prebuilt.tar
# devel.output=type=docker,dest=/tmp/devel.tar
# runtime.output=type=docker,dest=/tmp/runtime.tar

# - name: Upload Artifact - prebuilt
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-prebuilt
# uses: actions/upload-artifact@v4
# with:
# name: prebuilt-image${{ inputs.tag-suffix }}
# path: /tmp/prebuilt.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Remove tar file - prebuilt
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# run: |
# rm /tmp/prebuilt.tar
# shell: bash

# - name: Upload Artifact - devel
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-devel
# uses: actions/upload-artifact@v4
# with:
# name: devel-image${{ inputs.tag-suffix }}
# path: /tmp/devel.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Remove tar file - devel
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# run: |
# rm /tmp/devel.tar
# shell: bash

# - name: Upload Artifact - runtime
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: artifact-upload-step-runtime
# uses: actions/upload-artifact@v4
# with:
# name: runtime-image${{ inputs.tag-suffix }}
# path: /tmp/runtime.tar
# retention-days: 7
# compression-level: 6
# overwrite: true
# if-no-files-found: warn

# - name: Remove tar file - runtime
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# run: |
# rm /tmp/runtime.tar
# shell: bash

# - name: Output artifact URLs
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
# id: output-artifact-urls
# run: |
# echo 'prebuilt URL ${{ steps.artifact-upload-step-prebuilt.outputs.artifact-url }}'
# echo 'devel URL ${{ steps.artifact-upload-step-devel.outputs.artifact-url }}'
# echo 'runtime URL ${{ steps.artifact-upload-step-runtime.outputs.artifact-url }}'
# shell: bash

0 comments on commit 70851bc

Please sign in to comment.