Bumping version and building the image
This commit is contained in:
parent
f16d64ee67
commit
792d7cd0b8
|
|
@ -0,0 +1,44 @@
|
|||
name: Bump Version
|
||||
description: "This action bumps package version and commits to master"
|
||||
|
||||
inputs:
|
||||
GH_APP_ID:
|
||||
description: GitHub app (bot) id to retrieve the token the installation token.
|
||||
required: true
|
||||
GH_APP_KEY_BASE64:
|
||||
description: GitHub app (bot) private key in base64 to retrieve the installation token.
|
||||
required: true
|
||||
|
||||
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
|
||||
|
|
@ -76,23 +76,23 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# - name: Build Docker image
|
||||
# uses: docker/build-push-action@v4
|
||||
# with:
|
||||
# context: ${{ github.workspace }}
|
||||
# push: false
|
||||
# tags: ${{ env.DOCKER_REPO }}:${{ github.run_id }}
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ${{ github.workspace }}
|
||||
push: false
|
||||
tags: ${{ env.DOCKER_REPO }}:${{ github.run_id }}
|
||||
|
||||
# - name: Bump Version
|
||||
# id: bump-version
|
||||
# uses: philips-internal/pics-workflows/.github/actions/bump-version@v2.10
|
||||
# with:
|
||||
# GH_APP_ID: ${{ secrets.REP_GITHUB_APP_ID }}
|
||||
# GH_APP_KEY_BASE64: ${{ secrets.REP_GITHUB_APP_KEY_BASE64 }}
|
||||
- name: Bump Version
|
||||
id: bump-version
|
||||
uses: ./.github/actions/bump-version
|
||||
with:
|
||||
GH_APP_ID: ${{ secrets.REP_GITHUB_APP_ID }}
|
||||
GH_APP_KEY_BASE64: ${{ secrets.REP_GITHUB_APP_KEY_BASE64 }}
|
||||
|
||||
# - name: Publish Docker image
|
||||
# uses: docker/build-push-action@v4
|
||||
# with:
|
||||
# context: ${{ github.workspace }}
|
||||
# push: true
|
||||
# tags: ${{ env.DOCKER_REPO }}:${{ steps.bump-version.outputs.version }}
|
||||
- name: Publish Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ${{ github.workspace }}
|
||||
push: true
|
||||
tags: ${{ env.DOCKER_REPO }}:${{ steps.bump-version.outputs.version }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue