Revert "Remove broken e2e test. (#494)" #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Artifacts | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/artifacts.yaml' | |
- 'tools/buildimage/**' | |
push: | |
branches: | |
- main | |
jobs: | |
export-debs: | |
runs-on: ubuntu-22.04 | |
container: | |
image: debian@sha256:4cb3f4198e4af2d03dffe6bfa4f3686773596494ef298f3882553d52e885634b # debian:bullseye-20240110 | |
steps: | |
- name: apt update | |
run: apt update -y && apt upgrade -y | |
- name: install sudo | |
run: apt install -y sudo | |
- name: Checkout repository | |
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2 | |
- name: Build debs | |
run: bash build_debs.sh | |
- name: Build debs.tar | |
run: find . -name 'cuttlefish-*.deb' -print0 | tar -cvf debs.tar --null --files-from - | |
- name: Publish debs.tar | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debs | |
path: debs.tar | |
export-gce-image: | |
needs: export-debs | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Free space | |
run: rm -rf /opt/hostedtoolcache | |
- name: Checkout repository | |
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2 | |
- name: Download debs.tar | |
uses: actions/download-artifact@v3 | |
with: | |
name: debs | |
- name: Untar debs.tar | |
run: tar -xf debs.tar | |
- name: Build image | |
run: bash tools/buildimage/main.sh | |
- name: Publish image | |
uses: actions/upload-artifact@v3 | |
with: | |
name: image_gce_debian11_amd64 | |
path: image.tar.gz | |