Skip to content

Commit

Permalink
Add github workflow files
Browse files Browse the repository at this point in the history
Copied from atuin repo, might need some tweaking
  • Loading branch information
wzzrd committed Mar 5, 2024
1 parent e07d510 commit b95fa10
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build and release collection to galaxy

on:
push:
tags:
- 'v*'

jobs:
deploy_to_galaxy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy Ansible Galaxy Collection
uses: artis3n/ansible_galaxy_collection@v2
with:
api_key: ${{ secrets.GALAXY_API_KEY }}
90 changes: 90 additions & 0 deletions .github/workflows/tests-and-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Lint, test and tag

on: push

jobs:
lint-all-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: run-ansible-lint
uses: ansible/[email protected]

molecule-act-default:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Run molecule tests for act role
uses: gofrolist/molecule-action@v2
with:
molecule_working_dir: ${{ github.repository }}/roles/act
molecule_args: --driver-name docker
env:
ANSIBLE_FORCE_COLOR: '1'

molecule-gitea-default:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Run molecule tests for gitea role
uses: gofrolist/molecule-action@v2
with:
molecule_working_dir: ${{ github.repository }}/roles/gitea
molecule_args: --driver-name docker
env:
ANSIBLE_FORCE_COLOR: '1'

molecule-gitea-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Run molecule tests for gitea role
uses: gofrolist/molecule-action@v2
with:
molecule_working_dir: ${{ github.repository }}/roles/gitea
molecule_args: --driver-name docker -s update
env:
ANSIBLE_FORCE_COLOR: '1'

molecule-gitea-and-act:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Run molecule tests for act and gitea roles together
uses: gofrolist/molecule-action@v2
with:
molecule_working_dir: ${{ github.repository }}
molecule_args: --driver-name docker
env:
ANSIBLE_FORCE_COLOR: '1'

tag-new-versions:
runs-on: ubuntu-latest
needs:
- molecule-act-default
- molecule-gitea-default
- molecule-gitea-update
- molecule-gitea-and-act
- lint-all-files
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: salsify/action-detect-and-tag-new-version@v2
with:
version-command: |
awk ' /version: / { print $2 } ' galaxy.yml | tr -d '"'

0 comments on commit b95fa10

Please sign in to comment.