Skip to content

Commit

Permalink
Merge branch 'youtalk-disable-upload-artifacts' into cache-apt-archives
Browse files Browse the repository at this point in the history
  • Loading branch information
youtalk committed May 29, 2024
2 parents 20d5d44 + 9f3d4f5 commit efe525e
Showing 1 changed file with 4 additions and 85 deletions.
89 changes: 4 additions & 85 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,110 +85,29 @@ runs:
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build and Push - prebuilt and devel
if: ${{ (github.event_name == 'push' && github.ref_type == 'branch') || github.event_name == 'schedule' }}
- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v3
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/docker-bake.hcl
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
targets: |
prebuilt
devel
provenance: false
set: |
${{ inputs.build-args }}
- name: Build and Publish to GitHub Container Registry
if: ${{ ( github.event_name == 'push' && github.ref_type == 'tag' ) || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v3
with:
push: true
files: |
docker/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
provenance: false
set: |
${{ inputs.build-args }}
- name: Build and Save Artifacts
- name: Build only
uses: docker/bake-action@v3
with:
push: false
files: |
docker/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
provenance: false
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: error

- 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: error

- 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: error

- 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
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 efe525e

Please sign in to comment.