Skip to content

(2.1.3) fix dockerhub ci #18

(2.1.3) fix dockerhub ci

(2.1.3) fix dockerhub ci #18

Workflow file for this run

name: prod ci
on:
push:
tags:
- v*
jobs:
build-and-deploy-to-ghcr:
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages 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@v3
with:
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:run-${{ github.run_id }}-${{ github.run_attempt }}
ghcr.io/${{ github.repository }}:sha-${{ github.sha }}
build-and-deploy-to-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Login to Github Packages Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push docker image
uses: docker/build-push-action@v3
with:
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
${{ secrets.DOCKER_USERNAME }}/blaze:latest
${{ secrets.DOCKER_USERNAME }}/blaze:${{ github.ref_name }}
${{ secrets.DOCKER_USERNAME }}/blaze:run-${{ github.run_id }}-${{ github.run_attempt }}
${{ secrets.DOCKER_USERNAME }}/blaze:sha-${{ github.sha }}