why using diff name bru #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Image | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64' | |
- | |
run: docker context create ci | |
- | |
run: docker context use ci | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
buildkitd-flags: --debug | |
version: v0.10.4 | |
endpoint: ci | |
- | |
name: Build and push ${{ github.event.repository.name }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ github.sha }},${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |