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 874c0a6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 24 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
1 change: 1 addition & 0 deletions .github/actions/build/package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ runs:
- name: Build package
id: build-package
run: |
uname -a
docker run --rm \
-e PROJECT_ID=${{ inputs.PROJECT_ID }} \
-e DISTRO=${{ inputs.DISTRO }} \
Expand Down
50 changes: 33 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 All @@ -36,20 +35,34 @@ jobs:
id: get-version
uses: ./.github/actions/version

build-package:
build-package-amd64:
needs:
- get-version

strategy:
matrix:
arch: ['amd64','arm64']
runs-on:
- ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build package
id: build-package
uses: ./.github/actions/build/package
with:
ARCH: amd64
COMMIT_ID: ${{ needs.get-version.outputs.COMMIT_ID }}
DISTRO: ${{ env.DISTRO }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.DISTRO }}-${{ matrix.arch }}
PROJECT_ID: 'piler'
VERSION: ${{ needs.get-version.outputs.VERSION }}

build-package-arm64:
needs:
- get-version

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

outputs:
PACKAGE: ${{ steps.build-package.outputs.PACKAGE }}
- ARM64

steps:
- uses: actions/checkout@v4
Expand All @@ -58,7 +71,7 @@ jobs:
id: build-package
uses: ./.github/actions/build/package
with:
ARCH: ${{ matrix.arch }}
ARCH: arm64
COMMIT_ID: ${{ needs.get-version.outputs.COMMIT_ID }}
DISTRO: ${{ env.DISTRO }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.DISTRO }}-${{ matrix.arch }}
Expand All @@ -68,13 +81,15 @@ jobs:
build-image:
needs:
- get-version
- build-package
- build-package-amd64
- build-package-arm64

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

steps:
- uses: actions/checkout@v4

- name: Download packages
uses: actions/download-artifact@v4
with:
Expand All @@ -94,13 +109,14 @@ jobs:

create-release:
needs:
- build-package
- build-image

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

steps:
- uses: actions/checkout@v4

- name: Download packages
uses: actions/download-artifact@v4
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- synchronize # commit pushed to PR
- reopened # closed PR reopened

concurrency:
group: ${{ github.ref_name == 'master' && 'master' || github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'master' }}

env:
ARCHIVE_HOST: test1.acts.hu
IMAGE_NAME: sutoj/piler
Expand All @@ -20,8 +24,7 @@ env:
jobs:
get-version:
runs-on:
- self-hosted
- X64
- ubuntu-latest

outputs:
IMAGE_TAG: ${{ steps.get-version.outputs.IMAGE_TAG }}
Expand Down

0 comments on commit 874c0a6

Please sign in to comment.