Adding checkout

This commit is contained in:
Eduardo Vozniak 2023-10-02 14:41:22 -03:00
parent 01681cf194
commit b4cc192cd6
No known key found for this signature in database
GPG Key ID: ACB52F85E23B1C50
2 changed files with 16 additions and 37 deletions

View File

@ -1,36 +0,0 @@
name: Bump Version
description: "This action bumps package version and commits to master"
outputs:
version:
description: "The version after the bump"
value: ${{ steps.bump-version.outputs.version }}
runs:
using: "composite"
steps:
- uses: ahmadnassri/action-workflow-queue@v1
with:
timeout: 3600000
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Bump version
id: bump-version
shell: bash
run: |
pip3 install --root-user-action=ignore --upgrade bumpversion
sudo apt-get update && sudo apt-get install -y xmlstarlet --no-install-recommends
bumpversion patch
version=`cat VERSION`
echo "VERSION=$version" >> "$GITHUB_ENV"
echo "VERSION=$version" >> "$GITHUB_OUTPUT"
echo "changed_files=.bumpversion.cfg,VERSION" >> "$GITHUB_OUTPUT"
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
add: .bumpversion.cfg VERSION

View File

@ -15,6 +15,15 @@ on:
pull_request:
branches: [pics]
paths-ignore:
- "docs/**"
- "VERSION"
- ".bumpversion.cfg"
- "**.md"
- "catalog-info.yaml"
- "mkdocs.yml"
- "philips-repo.yaml"
workflow_dispatch:
jobs:
@ -85,9 +94,12 @@ jobs:
Bump-version:
runs-on: ubuntu-22.04
name: Publish to docker repository
name: Bumping the version
needs: [Build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
@ -116,6 +128,9 @@ jobs:
name: Publish to docker repository
needs: [Bump-version]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker login
run: |
docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}'