Skip to content

feat: 添加 arm 架构支持 #16

feat: 添加 arm 架构支持

feat: 添加 arm 架构支持 #16

Workflow file for this run

---

Check failure on line 1 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml: (Line: 12, Col: 14, Idx: 281) - (Line: 12, Col: 29, Idx: 296): While scanning a plain scalar, find unexpected ':'.
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)