Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 5a1ab3d

Browse files
authored
fix(gha): add release-please (#481)
1 parent 17054d8 commit 5a1ab3d

File tree

5 files changed

+47
-18
lines changed

5 files changed

+47
-18
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ on:
3737
ANSIBLE_DEBUG:
3838
type: choice
3939
description: ANSIBLE_DEBUG (true, false)
40-
default: "false"
4140
options:
4241
- "false"
4342
- "true"
@@ -54,7 +53,6 @@ on:
5453
build_upload:
5554
type: choice
5655
description: Upload release to Vagrant Cloud
57-
default: "false"
5856
options:
5957
- "false"
6058
- "true"
@@ -63,6 +61,7 @@ on:
6361
- cron: "0 1 1 * *"
6462

6563
env:
64+
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6665
PACKER_IMAGES_OUTPUT_DIR: /var/tmp/packer-templates-images
6766
PACKER_CACHE_DIR: /var/tmp/packer_cache
6867
LOGDIR: /var/tmp/packer-templates-logs
@@ -196,26 +195,39 @@ jobs:
196195
- name: Install packages
197196
run: |
198197
set -euxo pipefail
199-
# Remove unused packages to save some disk space
200-
rm -rf /Users/runner/Library/Developer /Users/runner/Library/Android /Users/runner/hostedtoolcache /Users/runner/.dotnet
201-
brew update
202-
brew install bash coreutils gnu-sed jq packer hudochenkov/sshpass/sshpass vagrant
198+
brew install ansible bash coreutils gnu-sed jq packer hudochenkov/sshpass/sshpass hashicorp/tap/hashicorp-vagrant
199+
203200
if [[ "${PACKER_VAGRANT_PROVIDER}" = "libvirt" ]]; then
204201
brew install qemu xorriso
202+
qemu-system-x86_64 --version
205203
fi
204+
206205
if [[ "${PACKER_VAGRANT_PROVIDER}" = "virtualbox" ]]; then
207206
brew install virtualbox
207+
vboxmanage --version
208208
fi
209-
# renovate: datasource=pypi depName=ansible
210-
ANSIBLE_VERSION="9.2.0"
211-
pip3 install ansible=="${ANSIBLE_VERSION}"
209+
210+
packer plugins install github.com/hashicorp/ansible
211+
packer plugins install github.com/hashicorp/qemu
212+
packer plugins install github.com/hashicorp/vagrant
213+
packer plugins install github.com/hashicorp/virtualbox
214+
215+
vagrant --version
216+
packer --version
217+
ansible --version
218+
212219
if [[ "${BUILD}" =~ windows ]]; then
213220
# renovate: datasource=pypi depName=pywinrm
214221
PYWINRM_VERSION="0.4.3"
215222
pip3 install pywinrm=="${PYWINRM_VERSION}"
216-
ansible-galaxy collection install -v -r ansible/requirements.yml
223+
ansible-galaxy collection install --force -r ansible/requirements.yml
217224
fi
225+
218226
echo "/usr/local/bin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/coreutils/libexec/gnubin" >> "${GITHUB_PATH}"
227+
228+
# Remove unused packages to save some disk space
229+
rm -rf /Users/runner/Library/Developer /Users/runner/Library/Android /Users/runner/hostedtoolcache /Users/runner/.dotnet
230+
219231
# Used by mxschmitt/action-tmate
220232
touch continue
221233
@@ -230,12 +242,12 @@ jobs:
230242
./build.sh "${BUILD}"
231243
232244
- name: Upload logs to GitHub artifact store in case of VirtualBox failure
233-
uses: actions/upload-artifact@v4
234-
if: ${{ always() && (steps.build_image.outcome == 'failure') && contains(matrix.stage, 'virtualbox') }}
245+
uses: actions/upload-artifact@v3
246+
if: ${{ always() && contains(matrix.stage, 'virtualbox') }}
235247
with:
236248
name: ${{ matrix.stage }}
237249
path: ${{ env.LOGDIR }}/*
238-
retention-days: 1
250+
retention-days: 3
239251

240252
- name: Check the created box image
241253
run: |

.github/workflows/release-please.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: release-please
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release-please-pr:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: google-github-actions/release-please-action@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e # v4.0.2
19+
with:
20+
release-type: simple

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ packer_cache/
1111

1212
# pre-commit config file
1313
.pre-commit-config.yaml
14-
15-
# release-it configuration file
16-
.release-it.yml

0 commit comments

Comments
 (0)