From b6c3717e9517e8e18a64dddb6f85a748667580e3 Mon Sep 17 00:00:00 2001 From: Avram Walden Date: Fri, 14 Jun 2024 08:47:03 -0700 Subject: [PATCH 1/4] ci: docker compose --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35d25c3..c75e398 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,6 @@ jobs: run: | NEW_VERSION=$(node -p "require('./package.json').version") docker tag osc_controller ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} - docker-compose push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} + docker compose push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} env: GHCR_PAT: ${{ secrets.GH_AUTH_TOKEN }} From b14c71df2ecf031e0dede79dc737daf59570e70c Mon Sep 17 00:00:00 2001 From: Avram Walden Date: Fri, 14 Jun 2024 08:53:44 -0700 Subject: [PATCH 2/4] ci: compose with file --- .github/workflows/release.yml | 4 ++-- docker-compose.yml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c75e398..6fa3e63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: POSTGRES_USER: ${{ env.POSTGRES_USER }} POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} run: | - docker-compose -f docker-compose.yml build + docker compose -f docker-compose.yml build - name: Authenticate to GitHub Container Registry run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin @@ -47,6 +47,6 @@ jobs: run: | NEW_VERSION=$(node -p "require('./package.json').version") docker tag osc_controller ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} - docker compose push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} + docker compose -f docker-compose.yml push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} env: GHCR_PAT: ${{ secrets.GH_AUTH_TOKEN }} diff --git a/docker-compose.yml b/docker-compose.yml index 40a6ecd..b6428ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.9' - services: postgres: image: postgres:15.4-alpine From 8914ab936fda34b56f188a47c9bf1b32bead16d3 Mon Sep 17 00:00:00 2001 From: Avram Walden Date: Fri, 14 Jun 2024 09:00:07 -0700 Subject: [PATCH 3/4] ci: removes compose for push --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fa3e63..c8d9074 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,6 @@ jobs: run: | NEW_VERSION=$(node -p "require('./package.json').version") docker tag osc_controller ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} - docker compose -f docker-compose.yml push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} + docker push ghcr.io/${{ github.repository_owner }}/osc_controller:${NEW_VERSION} env: GHCR_PAT: ${{ secrets.GH_AUTH_TOKEN }} From 889b52137983e2d1ef56b89743bcd1c41685f4e0 Mon Sep 17 00:00:00 2001 From: Avram Walden Date: Wed, 19 Jun 2024 10:54:42 -0700 Subject: [PATCH 4/4] ci: switches to action for docker login --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8d9074..89cf09c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,9 +40,16 @@ jobs: run: | docker compose -f docker-compose.yml build - - name: Authenticate to GitHub Container Registry - run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + # - name: Authenticate to GitHub Container Registry + # run: echo ${{ secrets.GH_AUTH_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_AUTH_TOKEN }} + - name: Push Docker Image to GitHub Packages run: | NEW_VERSION=$(node -p "require('./package.json').version")