Skip to content

Speeding up uber login #124

Speeding up uber login

Speeding up uber login #124

Workflow file for this run

---
name: Backend - Build Image
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Use action to check for CRLF endings
uses: erclu/check-crlf@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: name/app
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to GHCR
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: "./backend"
target: release
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}-backend:latest
labels: ${{ steps.meta.outputs.labels }}
- name: Push Hash Tag
uses: docker/build-push-action@v2
with:
context: "./backend"
target: release
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}-backend:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}