Test #45
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: 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 | |
- run: echo "### Hello world! :rocket:" >> $GITHUB_STEP_SUMMARY | |
- name: Download image | |
run: echo ${{ env.DEBIAN_FILEURL }} | |
if: steps.cache.outputs.cache-hit != 'true' | |
# run: wget "$IMAGE_URL | |
# -- | |
# - name: Cache | |
# uses: actions/cache@v4 | |
# with: | |
# key: ${{ env.CACHE_FILENAME }} | |
# path: "*.qcow2" | |
# id: cache | |
# - name: Cache image | |
# uses: actions/cache@v4 | |
# with: | |
# key: "debian-${{ env.DEBIAN_VERSION }}-${{ env.DEBIAN_VARIANT }}-${{ env.DEBIAN_RELEASE }}" | |
# path: "*.qcow2" | |
# id: cache | |
# - name: Download image | |
# if: steps.cache.outputs.cache-hit != 'true' | |
# run: echo Downloading file... | |
# #run: wget "https://cloud.debian.org/images/cloud/$DEBIAN_VERNAME/$DEBIAN_RELEASE/debian-${DEBIAN_VERSION}-${DEBIAN_VARIANT}-${DEBIAN_RELEASE}.qcow2" | |
# - name: Upload original image artifact | |
# run: gh release upload "${GITHUB_REF_NAME}" *.qcow2 | |
# 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 |