Merge pull request #96 from fossyy/staging

Build Docker images for x86 and ARM architectures
This commit is contained in:
2024-10-08 19:40:08 +07:00
committed by GitHub

View File

@ -14,27 +14,35 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image - name: Build and push Docker image for main
uses: docker/build-push-action@v2 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
tags: | tags: |
${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:${{ github.ref_name }} ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:latest ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:latest
platforms: linux/amd64,linux/arm64
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
- name: Build and push Docker image for staging - name: Build and push Docker image for staging
uses: docker/build-push-action@v2 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
tags: | tags: |
${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:staging ${{ secrets.DOCKERHUB_USERNAME }}/filekeeper:staging
platforms: linux/amd64,linux/arm64
if: github.ref == 'refs/heads/staging' if: github.ref == 'refs/heads/staging'