cleanup workflow

This commit is contained in:
Jean-Christian Denis 2024-12-02 23:49:55 +01:00
parent ec0809f780
commit 9c49b0f07a
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -26,12 +26,10 @@ jobs:
version: ${{ steps.dotclear.outputs.version }} version: ${{ steps.dotclear.outputs.version }}
exists: ${{ steps.repository.outputs.exists }} exists: ${{ steps.repository.outputs.exists }}
steps: steps:
- name: Install required packages
run: curl -sSL https://bit.ly/install-xq | sudo bash
- name: Download and parse last version - name: Download and parse last version
id: dotclear id: dotclear
run: | run: |
curl -sSL https://bit.ly/install-xq | sudo bash
curl -fsSL -o versions.xml ${{ env.DOTCLEAR_URL }} curl -fsSL -o versions.xml ${{ env.DOTCLEAR_URL }}
echo version=$(cat versions.xml | xq -x "//release[@name='${{ env.DOTCLEAR_CANAL }}']/@version") >> $GITHUB_OUTPUT echo version=$(cat versions.xml | xq -x "//release[@name='${{ env.DOTCLEAR_CANAL }}']/@version") >> $GITHUB_OUTPUT
@ -42,12 +40,12 @@ jobs:
tag: ${{ steps.dotclear.outputs.version }} tag: ${{ steps.dotclear.outputs.version }}
do_release: do_release:
needs: check_release
if: (needs.check_release.outputs.exists == 'false')
name: Create repository release according to Dotclear version name: Create repository release according to Dotclear version
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
needs: check_release
if: (needs.check_release.outputs.exists == 'false')
steps: steps:
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -58,10 +56,13 @@ jobs:
with: with:
name: ${{ needs.check_release.outputs.version }} name: ${{ needs.check_release.outputs.version }}
tag_name: ${{ needs.check_release.outputs.version }} tag_name: ${{ needs.check_release.outputs.version }}
body: Source for docker image of Dotclear ${{ needs.check_release.outputs.version }} stable
draft: false draft: false
prerelease: false prerelease: false
do_image: do_image:
needs: check_release
if: ((needs.check_release.outputs.exists == 'false') || (github.event.inputs.rebuild == 'true'))
name: Build and push latest and versionned images name: Build and push latest and versionned images
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
@ -69,8 +70,6 @@ jobs:
contents: read contents: read
attestations: write attestations: write
id-token: write id-token: write
needs: check_release
if: ((needs.check_release.outputs.exists == 'false') || (github.event.inputs.rebuild == 'true'))
steps: steps:
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v4 uses: actions/checkout@v4