Skip to content

Commit

Permalink
feat: use build-push-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Nsttt committed Aug 12, 2024
1 parent 860a059 commit 54a2c5d
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,24 @@ jobs:
build-and-push-docker-image:
name: 🐳 Build and Push Docker Image
runs-on: ubuntu-latest

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: 🐳 Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 🛠 Build the Docker image
run: docker build -t ghcr.io/${{ github.repository_owner }}/sysarmy-landing:latest .docker
- name: 🚀 Push the Docker image to GitHub Container Registry
run: docker push ghcr.io/${{ github.repository_owner }}/sysarmy-landing:latest

- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v2

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

- name: 🛠 Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .docker
push: true
tags: ghcr.io/${{ github.repository_owner }}/sysarmy-landing:latest

0 comments on commit 54a2c5d

Please sign in to comment.