feat: 添加 arm 架构支持 #16
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
--- | ||
Check failure on line 1 in .github/workflows/main.yaml GitHub Actions / buildInvalid workflow file
|
||
name: build | ||
on: [push] | ||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
env: | ||
PY_COLORS: 1 # allows molecule colors to be passed to GitHub Actions | ||
ANSIBLE_FORCE_COLOR: 1 # allows ansible colors to be passed to GitHub Actions | ||
strategy: | ||
matrix: | ||
os: [verystar/centos:7] | ||
mysql-version: [8.0.34] | ||
scenario: [single_primary, standalone] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.x | ||
architecture: x64 | ||
# - uses: actions/cache@v1 | ||
# id: cache | ||
# with: | ||
# path: molecule/${{ matrix.scenario }}/files/ | ||
# key: ${{ matrix.os }}-mysql-${{ matrix.mysql-version }} | ||
# restore-keys: | | ||
# ${{ matrix.os }}-mysql-${{ matrix.mysql-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ansible molecule "molecule-plugins[docker]" ansible-lint | ||
ansible-galaxy collection install -r requirements.yml | ||
- name: Test with molecule | ||
env: | ||
MOLECULE_DISTRO: ${{ matrix.os }} | ||
MYSQL_VERSION: ${{ matrix.mysql-version }} | ||
MOLECULE_SCENARIO: ${{ matrix.scenario }} | ||
run: | | ||
cd .. | ||
ln -sf ansible-role-mysql mysql | ||
cd mysql | ||
molecule test --scenario-name ${MOLECULE_SCENARIO} | ||
- name: Publish role to Galaxy | ||
if: success() | ||
run: ansible-galaxy role import --branch main --api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY }} $(echo $GITHUB_REPOSITORY | cut -d/ -f1) $(echo $GITHUB_REPOSITORY | cut -d/ -f2) |