Skip to content

Commit

Permalink
Release workflow fix
Browse files Browse the repository at this point in the history
Signed-off-by: Janos SUTO <sj@acts.hu>
  • Loading branch information
jsuto committed Dec 20, 2024
1 parent 92419e8 commit 0e4e7bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
5 changes: 0 additions & 5 deletions .github/actions/build/image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ runs:
username: ${{ inputs.DOCKER_USERNAME }}
password: ${{ inputs.DOCKER_TOKEN }}

- name: Download package
uses: actions/download-artifact@v4
with:
path: docker

- name: Build image from package
uses: docker/build-push-action@v5
with:
Expand Down
47 changes: 14 additions & 33 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create release
name: Create new release

on:
push:
Expand All @@ -16,8 +16,7 @@ permissions:
jobs:
get-version:
runs-on:
- self-hosted
- X64
- ubuntu-latest

outputs:
IMAGE_TAG: ${{ steps.get-version.outputs.IMAGE_TAG }}
Expand Down Expand Up @@ -45,8 +44,7 @@ jobs:
arch: ['amd64','arm64']

runs-on:
- self-hosted
- ${{ matrix.arch }}
- ubuntu-latest

outputs:
PACKAGE: ${{ steps.build-package.outputs.PACKAGE }}
Expand All @@ -71,16 +69,24 @@ jobs:
- build-package

runs-on:
- self-hosted
- X64
- ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Download packages
uses: actions/download-artifact@v4
with:
path: docker
merge-multiple: true

- name: Get packages
run: |
ls -lR docker
mv docker/package-*/*.deb docker
ls -la docker
shell: bash

- name: Build image
uses: ./.github/actions/build/image
with:
Expand All @@ -89,30 +95,5 @@ jobs:
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ needs.get-version.outputs.VERSION }}
LOAD: false
PACKAGE: ${{ env.PROJECT_ID }}_${{ needs.get-version.outputs.VERSION }}-${{ env.DISTRO }}-${{ needs.get-version.outputs.COMMIT_ID }}
PLATFORMS: 'linux/amd64,linux/arm64'
PLATFORMS: 'linux/arm64'
PUSH: true

create-release:
needs:
- build-package

runs-on:
- self-hosted
- X64

steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#*-}" \
--generate-notes
gh release upload "$tag" piler*deb

0 comments on commit 0e4e7bf

Please sign in to comment.