Skip to content

Commit

Permalink
Release workflow updates and fixes (#342)
Browse files Browse the repository at this point in the history
* Updated release workflow to add steps for freeing disk space and
clering downloaded lib jars and enable tkltest-ui docker publish

Signed-off-by: Saurabh Sinha <sinha108@gmail.com>

* Updated action versions and deprecated use of set-output

Signed-off-by: Saurabh Sinha <sinha108@gmail.com>

* Updated docker/build-push-action version

Signed-off-by: Saurabh Sinha <sinha108@gmail.com>

* Fixed tag name and action versions

Signed-off-by: Saurabh Sinha <sinha108@gmail.com>

---------

Signed-off-by: Saurabh Sinha <sinha108@gmail.com>
  • Loading branch information
sinha108 committed Oct 4, 2023
1 parent 89ceb32 commit 1f30752
Showing 1 changed file with 45 additions and 28 deletions.
73 changes: 45 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: main
- name: Free up Ubuntu Runner disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
Expand All @@ -29,10 +39,12 @@ jobs:
cd ..; ls tkltest-lib/*
- name: Get release tag
id: get_release_tag
run: echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
# run: echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
- name: Set archive file name
id: set_file_name
run: echo ::set-output name=file_name::${{ github.event.repository.name }}-${{ steps.get_release_tag.outputs.tag_name }}-all-deps
run: echo "file_name=${{ github.event.repository.name }}-${{ steps.get_release_tag.outputs.tag_name }}-all-deps" >> "$GITHUB_OUTPUT"
# run: echo ::set-output name=file_name::${{ github.event.repository.name }}-${{ steps.get_release_tag.outputs.tag_name }}-all-deps
- name: Create archive release (.tgz and .zip) with all dependencies
run: |
cd ..; ls -l
Expand All @@ -41,7 +53,7 @@ jobs:
ls -l
- name: Build Changelog
id: gen_changelog
uses: mikepenz/release-changelog-builder-action@v1
uses: mikepenz/release-changelog-builder-action@v4
with:
failOnError: "true"
configuration: .github/workflows/release_config.json
Expand All @@ -54,23 +66,28 @@ jobs:
files: |
../${{ steps.set_file_name.outputs.file_name }}.zip
../${{ steps.set_file_name.outputs.file_name }}.tgz
- name: Clean Java libraries
run: |
cd tkltest-lib
ls *.jar | grep -v ccmcl | grep -v acts_3.2 | xargs rm
cd ..
- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for tkltest-unit Docker image
id: meta_tkltestunit
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.TKLTESTUNIT_IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
labels: |
org.opencontainers.image.description=See release notes at: https://github.com/konveyor/tackle-test-generator-cli/releases/tag/${{ steps.get_release_tag.outputs.tag_name }}
- name: Build and push tkltest-unit Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: setup/tkltestunit.Dockerfile
Expand All @@ -80,23 +97,23 @@ jobs:
build-args: |
GITHUB_USERNAME=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# - name: Extract metadata (tags, labels) for tkltest-ui Docker image
# id: meta_tkltestui
# uses: docker/metadata-action@v3
# with:
# images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.TKLTESTUI_IMAGE_NAME }}
# tags: |
# type=semver,pattern={{raw}}
# labels: |
# org.opencontainers.image.description=See release notes at: https://github.com/konveyor/tackle-test-generator-cli/releases/tag/${{ steps.get_release_tag.outputs.tag_name }}
# - name: Build and push tkltest-ui Docker image
# uses: docker/build-push-action@v2
# with:
# context: .
# file: setup/tkltestui.Dockerfile
# push: true
# tags: ${{ steps.meta_tkltestui.outputs.tags }}
# labels: ${{ steps.meta_tkltestui.outputs.labels }}
# build-args: |
# GITHUB_USERNAME=${{ github.actor }}
# GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for tkltest-ui Docker image
id: meta_tkltestui
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.TKLTESTUI_IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
labels: |
org.opencontainers.image.description=See release notes at: https://github.com/konveyor/tackle-test-generator-cli/releases/tag/${{ steps.get_release_tag.outputs.tag_name }}
- name: Build and push tkltest-ui Docker image
uses: docker/build-push-action@v5
with:
context: .
file: setup/tkltestui.Dockerfile
push: true
tags: ${{ steps.meta_tkltestui.outputs.tags }}
labels: ${{ steps.meta_tkltestui.outputs.labels }}
build-args: |
GITHUB_USERNAME=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1f30752

Please sign in to comment.