Skip to content

Commit

Permalink
Use 'build-push-action@v2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Scherer committed Apr 6, 2021
1 parent b42fe37 commit b68ed86
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,38 @@ name: CI

on:
push:
branches: [master]
branches:
- "main"
tags:
- "v*"
pull_request:
branches:
- "main"

jobs:
push:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1

- uses: crazy-max/ghaction-docker-meta@v2
id: meta
with:
images: intodocker/create-react-app
tags: |
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: intodocker/create-react-app
add_git_labels: true
tags: latest

- uses: docker/build-push-action@v2
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b68ed86

Please sign in to comment.