group updates to public branch #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate: | |
strategy: | |
matrix: | |
template: | |
- name: Debian8 | |
build_distribution_config_dir: Debian | |
build_release_config_dir: Debian/8/server | |
- name: Debian9 | |
build_distribution_config_dir: Debian | |
build_release_config_dir: Debian/9/server | |
- name: Debian10 | |
build_distribution_config_dir: Debian | |
build_release_config_dir: Debian/10/server | |
- name: CentOS7 | |
build_distribution_config_dir: CentOS | |
build_release_config_dir: CentOS/7/server | |
- name: CentOS8 | |
build_distribution_config_dir: CentOS | |
build_release_config_dir: CentOS/8/server | |
- name: Ubuntu1804 | |
build_distribution_config_dir: Ubuntu | |
build_release_config_dir: Ubuntu/18.04/server | |
- name: Ubuntu2004 | |
build_distribution_config_dir: Ubuntu | |
build_release_config_dir: Ubuntu/20.04/server | |
- name: Ubuntu2204 | |
build_distribution_config_dir: Ubuntu | |
build_release_config_dir: Ubuntu/22.04/server | |
- name: Windows2016 | |
build_distribution_config_dir: Windows | |
build_release_config_dir: Windows/2016/server | |
- name: Windows2019 | |
build_distribution_config_dir: Windows | |
build_release_config_dir: Windows/2019/server | |
name: Validate | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: "${{ github.repository }}" | |
submodules: true | |
- name: Download Packer | |
run: | | |
PACKER_LATEST_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r -M '.current_version') | |
curl -s "https://releases.hashicorp.com/packer/${PACKER_LATEST_VERSION}/packer_${PACKER_LATEST_VERSION}_linux_amd64.zip" --output /tmp/packer_linux_amd64.zip | |
sudo unzip -o /tmp/packer_linux_amd64.zip -d /usr/local/bin/ | |
- name: "Validate Packer templates" | |
working-directory: "${{ github.repository }}/templates" | |
run: | | |
packer validate \ | |
-only vsphere-iso \ | |
-var-file=common-vars.json \ | |
-var-file=${{ matrix.template.build_distribution_config_dir }}/distribution-vars.json \ | |
-var-file=${{ matrix.template.build_release_config_dir }}/box_info.json \ | |
-var-file=${{ matrix.template.build_release_config_dir }}/template.json \ | |
-var vm_build_id=$TEMPLATE_BUILD_ID \ | |
${{ matrix.template.build_distribution_config_dir }}/build-config.json | |
env: | |
TEMPLATE_BUILD_ID: ${{ github.job }}-${{ matrix.template.name }}-${{ github.run_id }} | |
VMWARE_VCENTER_PASSWORD: 'foobar' | |
# release: | |
# needs: | |
# - validate | |
# name: Release | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: 'lts/*' | |
# - name: Install dependencies | |
# run: | | |
# npm install -D \ | |
# "@semantic-release/commit-analyzer" \ | |
# "@semantic-release/release-notes-generator" \ | |
# "@semantic-release/changelog" \ | |
# "@semantic-release/github" \ | |
# "@semantic-release/git" | |
# - name: Release | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# run: npx semantic-release |