Simplifying workflow
This commit is contained in:
parent
7915a9e9c7
commit
424bbae5c2
1 changed files with 12 additions and 15 deletions
27
.github/workflows/deploy.yml
vendored
27
.github/workflows/deploy.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Build and Push Multi-Arch Docker Image
|
||||
name: Build and Push to GitHub Container Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -18,11 +18,8 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag ${{ github.event.repository.name }}:${{ github.sha }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
|
@ -31,12 +28,12 @@ jobs:
|
|||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||
- name: Tag images
|
||||
run: |
|
||||
docker tag ${{ github.event.repository.name }}:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
docker tag ${{ github.event.repository.name }}:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||
|
||||
- name: Push images to GitHub Container Registry
|
||||
run: |
|
||||
docker push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||
|
|
Loading…
Add table
Reference in a new issue