Skip to content

Commit

Permalink
chore(cd): publish image to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Feb 5, 2024
1 parent 1af9f56 commit dbb36a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ concurrency:

env:
IMAGE_NAME: commune
GHCR_REGISTRY: ghcr.io/commune-os

jobs:
publish_image:
Expand Down Expand Up @@ -53,3 +52,13 @@ jobs:

- name: Build Image
run: just docker_build_image

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish image to GitHub Container Registry
run: just docker_publish_image
5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ docker_build_image: docker_build_server
cp ./target/{{target_release}}/release/server ./tmp/server
chmod +x ./tmp/server
docker build -t "commune:{{commit_sha}}-{{target_release}}" .

# Publishes the Docker image to the GitHub Container Registry
docker_publish_image:
docker tag commune:{{commit_sha}}-{{target_release}} ghcr.io/commune-os/commune:{{commit_sha}}-{{target_release}}
docker push ghcr.io/commune-os/commune:{{commit_sha}}-{{target_release}}

0 comments on commit dbb36a4

Please sign in to comment.