Change dockerfile path on build-push-action #51
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: ci | ||
on: | ||
push: | ||
branches: [ Workflows ] | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest | ||
args: --timeout 5m | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
- run: go test -v ./... -covermode=atomic -coverprofile=coverage.out | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage.out | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
- test | ||
strategy: | ||
matrix: | ||
dir: ["", "clients/proxy-client", "clients/harbor-client"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/metadata-action@v3 | ||
id: meta | ||
with: | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
images: ghcr.io/${{ github.repository }}${{ matrix.dir }} | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
file: ${{ matrix.dir == "" && './Dockerfile' || matrix.dir + '/Dockerfile' }} | ||
Check failure on line 64 in .github/workflows/ci.yaml GitHub Actions / ciInvalid workflow file
|
||
context: ${{ matrix.dir }} | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |