Skip to content

Commit

Permalink
Build and Push to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Apr 8, 2024
1 parent 8c0e0f1 commit b16bc98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Build and Push Backend Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}/backend:latest

- name: Build and Push Frontend Docker Image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
Expand All @@ -44,7 +44,7 @@ jobs:
-X PATCH \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/user/packages/container/${{ github.repository }}/backend/visibility \
"https://api.github.com/user/packages/container/${{ github.repository }}/backend/visibility" \
-d '{"visibility":"public"}'
- name: Set Frontend Package Visibility to Public
Expand All @@ -53,5 +53,5 @@ jobs:
-X PATCH \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/user/packages/container/${{ github.repository }}/frontend/visibility \
"https://api.github.com/user/packages/container/${{ github.repository }}/frontend/visibility" \
-d '{"visibility":"public"}'

0 comments on commit b16bc98

Please sign in to comment.