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:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -18,11 +18,8 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Build the Docker image
|
||||||
uses: docker/setup-qemu-action@v2
|
run: docker build . --file Dockerfile --tag ${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
@ -31,12 +28,12 @@ jobs:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Tag images
|
||||||
uses: docker/build-push-action@v4
|
run: |
|
||||||
with:
|
docker tag ${{ github.event.repository.name }}:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
context: .
|
docker tag ${{ github.event.repository.name }}:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
- name: Push images to GitHub Container Registry
|
||||||
tags: |
|
run: |
|
||||||
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
docker push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
docker push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||||
|
|
Loading…
Add table
Reference in a new issue