Skip to content

Build vagrant images #2

Build vagrant images

Build vagrant images #2

Workflow file for this run

name: Build vagrant images
on:
push:
branches:
- master
paths:
- 'src/Containerfile'
pull_request:
paths:
- 'src/Containerfile'
workflow_dispatch:
schedule:
- cron: '0 1 * * 0'
jobs:
vagrant:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build image
run: |
sudo -E XDG_RUNTIME_DIR= podman build --file "src/Containerfile" --target=vagrant --tag "localhost/vagrant:latest" ./src
- name: Publish image
if: github.event_name != 'pull_request'
env:
CREDENTIALS: ${{ secrets.QUAY_IO_CREDENTIALS }}
run: |
authfile=`mktemp`
trap "rm -f '$authfile' || :" EXIT
sudo echo -e "$CREDENTIALS" > "$authfile"
sudo REGISTRY_AUTH_FILE="$authfile" podman push "localhost/vagrant:latest" "quay.io/sssd/vagrant:latest"