Updating repo #3
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: Build and Push Dash App Image to GHCR | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
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: Login to GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Convert GitHub repository to lowercase | |
id: vars | |
run: echo "REPO=${{ github.repository }}" | awk '{print tolower($0)}' | tee -a $GITHUB_ENV | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/${{ env.REPO }}/dash-app:latest | |
- name: Image digest | |
run: echo "Image digest is ${{ steps.docker_build.outputs.digest }}" | |
- name: Image URL | |
run: echo "Image URL is ghcr.io/${{ github.repository }}:latest" | |
- name: Logout of GitHub Container Registry | |
run: docker logout ghcr.io |