-
Notifications
You must be signed in to change notification settings - Fork 21
38 lines (35 loc) · 1010 Bytes
/
vagrant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"