Skip to content

Update test workflow #53

Update test workflow

Update test workflow #53

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
tags:
- v*
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# Release
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release draft
uses: ./.github/actions/create-release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
# Download
download:
name: Download image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load settings
run: source settings.sh
- id: cache
name: Cache
uses: ./.github/actions/smart-cache
- name: Download image
run: wget "$DEBIAN_FILEURL"
if: steps.cache.outputs.cache-hit != 'true'
- name: Upload original image artifact
run: gh release upload "${GITHUB_REF_NAME}" *.qcow2
if: startsWith(github.ref, 'refs/tags/')
# Rebuild images
rebuild-images:
name: Rebuild image
needs: [release, download]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load settings
run: source settings.sh
- run: echo ${{ env.GIT_CACHE_NAME }}
- run: echo ${{ env.GIT_CACHE_PATH }}
# - name: Cache
# uses: actions/cache@v4
# with:
# key: ${{ env.DEBIAN_VERSION }}
# path: "*.qcow2"
# id: cache
- run: echo "### Hello world! :rocket:" >> $GITHUB_STEP_SUMMARY