Skip to content

Commit

Permalink
Test Ubuntu 20.04 and 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Jan 22, 2025
1 parent f1dfc68 commit e4ba977
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/vagrant-box-archivematica.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ on:
- "dev/add-24.04-vagrant-base-image"
jobs:
build-base-image:
name: Build base image
name: "Build base image Ubuntu ${{ matrix.ubuntu-version }}"
runs-on: ubuntu-24.04
env:
PACKER_CACHE_DIR: ${{ github.workspace }}/.packer_cache
PACKER_LOG: TRACE
strategy:
fail-fast: false
matrix:
ubuntu-version: [
"20.04",
"22.04",
]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -26,29 +33,36 @@ jobs:
echo "LOGNAME=$USER" >> $GITHUB_ENV
- name: Build
run: |
cd ${{ github.workspace }}/packer/templates/vagrant-base-ubuntu-22.04-amd64
cd "${{ github.workspace }}/packer/templates/vagrant-base-ubuntu-${{ matrix.ubuntu-version }}-amd64"
packer init template.json.pkr.hcl
packer build -on-error=abort template.json.pkr.hcl
- name: Upload base image
uses: actions/upload-artifact@v4
with:
name: base-image
path: "${{ github.workspace }}/packer/builds/virtualbox/vagrant-base-ubuntu-22.04-amd64"
name: "base-image-${{ matrix.ubuntu-version }}"
path: "${{ github.workspace }}/packer/builds/virtualbox/vagrant-base-ubuntu-${{ matrix.ubuntu-version }}-amd64"
vagrant-box-archivematica:
name: Build and upload box image
name: "Build and upload box image Ubuntu ${{ matrix.ubuntu-version }}"
runs-on: ubuntu-24.04
needs: ["build-base-image"]
env:
PACKER_CACHE_DIR: ${{ github.workspace }}/.packer_cache
PACKER_LOG: TRACE
strategy:
fail-fast: false
matrix:
ubuntu-version: [
"20.04",
"22.04",
]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Restore base image
uses: actions/download-artifact@v4
with:
name: base-image
path: "${{ github.workspace }}/packer/builds/virtualbox/vagrant-base-ubuntu-22.04-amd64"
name: "base-image-${{ matrix.ubuntu-version }}"
path: "${{ github.workspace }}/packer/builds/virtualbox/vagrant-base-ubuntu-${{ matrix.ubuntu-version }}-amd64"
- name: "Install packer, vagrant and VirtualBox"
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Expand Down

0 comments on commit e4ba977

Please sign in to comment.