Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Bump actions/upload-artifact from 2 to 4 #107

Bump actions/upload-artifact from 2 to 4

Bump actions/upload-artifact from 2 to 4 #107

Workflow file for this run

# README FIRST
# 1. replace "NAMESPACE" and "COLLECTION_NAME" with the correct name in the env section (e.g. with 'community' and 'mycollection')
# 2. If you don't have unit tests remove that section
# 3. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
# If you need help please ask in #ansible-devel on Freenode IRC
name: Build
on:
# Run Build against all pushes (direct commits, also merged PRs), Pull Requests
push:
pull_request:
env:
NAMESPACE: equinix
COLLECTION_NAME: metal
jobs:
###
# Unit tests (OPTIONAL)
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
units:
runs-on: ubuntu-latest
name: Build (Ⓐ${{ matrix.ansible }})
strategy:
# As soon as the first unit test fails, cancel the others to free up the CI queue
fail-fast: true
matrix:
ansible:
- stable-2.9
- stable-2.10
- devel
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Set up Python
uses: actions/setup-python@v2
with:
# it is just required to run that once as "ansible-test units" in the docker image
# will run on all python versions it supports.
python-version: 3.8
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
# Run the build
- name: Run build
run: ansible-galaxy collection build
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- uses: actions/upload-artifact@v4
with:
name: ${{env.NAMESPACE}}-${{env.COLLECTION_NAME}}-${{github.sha}}-ansible-${{matrix.ansible}}.tar.gz
path: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/${{env.NAMESPACE}}-${{env.COLLECTION_NAME}}-*.tar.gz