Stripping uber attrs from event #126
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: Frontend - Build Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@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: "./frontend" | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/${{ github.repository }}-frontend:latest | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Push Hash Tag | |
uses: docker/build-push-action@v2 | |
with: | |
context: "./frontend" | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/${{ github.repository }}-frontend:${{ github.sha }} | |
labels: ${{ steps.meta.outputs.labels }} |