From a39f4e9d9e199b3370fbf1f593dcb147f63a5fb5 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Tue, 24 Sep 2024 10:26:47 +0200 Subject: [PATCH] Build collection tarball on tag push --- .github/workflows/collection-build.yaml | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/collection-build.yaml diff --git a/.github/workflows/collection-build.yaml b/.github/workflows/collection-build.yaml new file mode 100644 index 00000000..ecb8f3d5 --- /dev/null +++ b/.github/workflows/collection-build.yaml @@ -0,0 +1,27 @@ +name: Build collection +on: + push: + tags: + - '*' + +jobs: + ansible-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Build collection + run: | + python -m pip install --upgrade pip + pip install -r requirements-testing.txt + ansible-galaxy collection build -vvv --force + sha256sum redhat-artifact_signer-*.tar.gz + - name: Upload collection tarball + uses: actions/upload-artifact@v4 + id: artifact-upload-step + with: + path: redhat-artifact_signer-*.tar.gz + retention-days: 60 + if-no-files-found: error + - name: Output artifact ID + run: echo 'Artifact ID is ${{ steps.artifact-upload-step.outputs.artifact-id }}' \ No newline at end of file