From 3a1e3843b9646db328bc2138d3522ee5dba11c79 Mon Sep 17 00:00:00 2001 From: April Hall Date: Sun, 23 Feb 2025 22:25:18 -0500 Subject: [PATCH] ci: Workflow to publish the GHCR image on push --- .github/workflows/ghcr-publish.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/ghcr-publish.yml diff --git a/.github/workflows/ghcr-publish.yml b/.github/workflows/ghcr-publish.yml new file mode 100644 index 0000000..d83305c --- /dev/null +++ b/.github/workflows/ghcr-publish.yml @@ -0,0 +1,17 @@ +name: Push to GHCR +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build Docker image + run: sudo docker build '.' -t 'ghcr.io/arithefirst/svchat:latest' + + - name: Login to GHCR + run: echo ${{ secrets.GH_PAT }} | sudo docker login --username arithefirst --password-stdin ghcr.io + + - name: Push Docker image + run: sudo docker push 'ghcr.io/arithefirst/svchat'