From ecb3030795703b1adeca15a60ab6afe5e1090956 Mon Sep 17 00:00:00 2001 From: Alex Tyshkevich Date: Sat, 17 Dec 2022 16:05:59 +0400 Subject: [PATCH 1/5] Add docker build workflow, change action to use prebuild image --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ action.yml | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..e02ddc53 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build docker image +on: + push: + branches: ["master"] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: docker/setup-buildx-action@v2 + + - uses: docker/login-action@v2 + with: + registry: "ghcr.io" + username: ${{ github.actor }} + password: ${{ github.GITHUB_TOKEN }} + + - uses: docker/metadata-action@v4 + id: meta + with: + images: "ghcr.io/condensedtea/helm" + tags: | + ${{ github.sha }} + latest + + - uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/action.yml b/action.yml index 5321e9df..8c2057c7 100644 --- a/action.yml +++ b/action.yml @@ -66,4 +66,4 @@ inputs: required: false runs: using: docker - image: Dockerfile + image: ghcr.io/condensedtea/helm From caf6b94dc61177d6d5cce7aa40918832ae641bd5 Mon Sep 17 00:00:00 2001 From: Alex Tyshkevich Date: Sat, 17 Dec 2022 16:08:45 +0400 Subject: [PATCH 2/5] fix ghcr password --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e02ddc53..9bdaf682 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: with: registry: "ghcr.io" username: ${{ github.actor }} - password: ${{ github.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/metadata-action@v4 id: meta From 9053a8ffe189ca61f6e034f491a51b6a94408b4b Mon Sep 17 00:00:00 2001 From: Alex Tyshkevich Date: Sat, 17 Dec 2022 16:10:21 +0400 Subject: [PATCH 3/5] add checkout step to build workflow --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bdaf682..529f065a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: ${{ github.sha }} latest + - uses: actions/checkout@v3 + - uses: docker/build-push-action@v3 with: context: . From 8c03df1861a3aeb4b374b4b7deda850280f96cfd Mon Sep 17 00:00:00 2001 From: Alex Tyshkevich Date: Sat, 17 Dec 2022 16:30:37 +0400 Subject: [PATCH 4/5] change image path to parent repo --- .github/workflows/build.yml | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 529f065a..88972e26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - uses: docker/metadata-action@v4 id: meta with: - images: "ghcr.io/condensedtea/helm" + images: "ghcr.io/vimeda/helm" tags: | ${{ github.sha }} latest diff --git a/action.yml b/action.yml index 8c2057c7..46cafad7 100644 --- a/action.yml +++ b/action.yml @@ -66,4 +66,4 @@ inputs: required: false runs: using: docker - image: ghcr.io/condensedtea/helm + image: ghcr.io/vimeda/helm From 8edef423fefecf81b765552bcac53160d38e647e Mon Sep 17 00:00:00 2001 From: Alex Tyshkevich Date: Sat, 17 Dec 2022 16:57:55 +0400 Subject: [PATCH 5/5] fix image reference in action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 8c2057c7..3de78e60 100644 --- a/action.yml +++ b/action.yml @@ -66,4 +66,4 @@ inputs: required: false runs: using: docker - image: ghcr.io/condensedtea/helm + image: docker://ghcr.io/condensedtea/helm