Skip to content

Commit

Permalink
Run workflow on dev branch pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Jan 21, 2025
1 parent 28e01ef commit 9079a5d
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/vagrant-box-archivematica.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
name: Archivematica Vagrant box
on:
workflow_dispatch:
inputs:
version:
description: Version (e.g. 1.13.0-rc.2)
required: true
description:
description: Description
required: true
push:
branches:
- "dev/add-24.04-vagrant-base-image"
jobs:
build-base-image:
name: Build base image
runs-on: ubuntu-24.04
env:
PACKER_CACHE_DIR: ${{ github.workspace }}/.packer_cache
PACKER_LOG: TRACE
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,6 +44,7 @@ jobs:
needs: ["build-base-image"]
env:
PACKER_CACHE_DIR: ${{ github.workspace }}/.packer_cache
PACKER_LOG: TRACE
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -81,10 +78,10 @@ jobs:
cd ${{ github.workspace }}/packer/templates/vagrant-box-archivematica
packer build -on-error=abort template.json
mv ${{ github.workspace }}/packer/builds/virtualbox/vagrant-am.box \
${{ github.workspace }}/archivematica-vagrant-${{ github.event.inputs.version }}.box
${{ github.workspace }}/archivematica-vagrant-v1.17.0.box
- name: Provision a test VM with the new image
run: |
vagrant init --minimal --no-tty archivematica-vagrant-${{ github.event.inputs.version }} file://${{ github.workspace }}/archivematica-vagrant-${{ github.event.inputs.version }}.box
vagrant init --minimal --no-tty archivematica-vagrant-v1.17.0 file://${{ github.workspace }}/archivematica-vagrant-v1.17.0.box
cat Vagrantfile
vagrant up --debug-timestamp --provider virtualbox
- name: Test AM is running in the test VM
Expand All @@ -106,13 +103,3 @@ jobs:
'http://10.10.10.20:8000/api/v2/pipeline/' \
| jq -r '.meta.total_count == 1' \
) == true
- name: Upload
run: |
cd ${{ github.workspace }}/tools/vagrant-box-uploader
bundle install
ruby upload.rb \
archivematica \
'${{ github.workspace }}/archivematica-vagrant-${{ github.event.inputs.version }}.box' \
'${{ secrets.VAGRANT_CLOUD }}' \
'${{ github.event.inputs.version }}' \
'${{ github.event.inputs.description }}'

0 comments on commit 9079a5d

Please sign in to comment.