From e1c43f56698a48588fbf803bbbbfda414ea1407b Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Sat, 13 Jul 2024 18:35:34 +0200 Subject: [PATCH 1/6] feat: add package workflow --- .github/workflows/package.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..ea49c8ae --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,55 @@ +name: package + +on: + push: + branches: + - next + - cd_* + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + pull_request: + + workflow_dispatch: + +env: + CI: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: docker meta details + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{github.repository}} + flavor: | + latest=auto + tags: | + type=edge,branch=next + type=semver,pattern={{version}} + type=sha + + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + + - name: Login to Github Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push Release + uses: docker/build-push-action@v5 + with: + push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + target: vckit-api +# build-args: | + + From 007e57ec381cdaf757aadaa6ef651923254e653d Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Sat, 13 Jul 2024 19:22:26 +0200 Subject: [PATCH 2/6] fix: docker build target and args --- .github/workflows/package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index ea49c8ae..1e247b6f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -49,7 +49,8 @@ jobs: push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - target: vckit-api -# build-args: | + target: mock-app + build-args: | + - CONFIG_FILE=./app-config.json From 34684605d97a73d0fda7488409f4e800ee774614 Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Sat, 13 Jul 2024 19:24:47 +0200 Subject: [PATCH 3/6] fix: docker build target and args --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1e247b6f..778c948e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -49,7 +49,7 @@ jobs: push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - target: mock-app + target: release build-args: | - CONFIG_FILE=./app-config.json From 0bdf776229bd74f777218010eef8a6598cb15d47 Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Sat, 13 Jul 2024 19:28:20 +0200 Subject: [PATCH 4/6] fix: set docker build target to build --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 778c948e..d213fdfc 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -49,7 +49,7 @@ jobs: push: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - target: release + target: build build-args: | - CONFIG_FILE=./app-config.json From b6a411bd7bb3bf04fd0c987c5c4cd8394412d982 Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Sat, 13 Jul 2024 19:36:37 +0200 Subject: [PATCH 5/6] fix: docker build arg --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index d213fdfc..d4fb2550 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -51,6 +51,6 @@ jobs: labels: ${{ steps.meta.outputs.labels }} target: build build-args: | - - CONFIG_FILE=./app-config.json + CONFIG_FILE=./app-config.json From 341bb1b4a3a70ebd0d747a7a47865a8cab323da3 Mon Sep 17 00:00:00 2001 From: Kseniya Shychko Date: Mon, 29 Jul 2024 23:41:57 +0200 Subject: [PATCH 6/6] fix: update conditions when package workflow is run --- .github/workflows/package.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index d4fb2550..b02db16f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -2,13 +2,8 @@ name: package on: push: - branches: - - next - - cd_* tags: - "v[0-9]+.[0-9]+.[0-9]+" - pull_request: - workflow_dispatch: env: