Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
ci: fix publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
BPierrick committed Jan 17, 2022
1 parent a94c0dc commit afe9304
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 39 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ name: app

on:
push:
paths:
- "**"
branches:
- main
tags:
- "v*"
pull_request:
paths:
- "**"

jobs:
lint-and-test:
Expand All @@ -26,36 +20,3 @@ jobs:
- name: Run tests
run: yarn test
working-directory: .
build-and-publish:
needs: lint-and-test
runs-on: ubuntu-18.04
steps:
- id: docker_meta
name: Docker Metadata action
uses: docker/[email protected]
with:
images: arkhn/patient-timeline
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=sha
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
file: ./Dockerfile
build-args: |
VERSION_NAME=${{ steps.docker_meta.outputs.version }}
VERSION_SHA=${GITHUB_SHA::8}
platforms: linux/amd64
# always push images to the hub
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
40 changes: 40 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build-and-publish

on:
push:
tags:
- "v*"

jobs:
build-and-publish:
runs-on: ubuntu-18.04
steps:
- id: docker_meta
name: Docker Metadata action
uses: docker/[email protected]
with:
images: arkhn/patient-timeline
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=sha
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
file: ./Dockerfile
build-args: |
VERSION_NAME=${{ steps.docker_meta.outputs.version }}
VERSION_SHA=${GITHUB_SHA::8}
platforms: linux/amd64
# always push images to the hub
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit afe9304

Please sign in to comment.