Skip to content

Commit

Permalink
feat: moved to single action
Browse files Browse the repository at this point in the history
  • Loading branch information
cskiwi committed Apr 3, 2021
1 parent 3e077c4 commit 95daadc
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 84 deletions.
83 changes: 0 additions & 83 deletions .github/workflows/publish-docker.yaml

This file was deleted.

79 changes: 78 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# - Docker push
# - Helm package
# - Upgrade helm
publish:
publish-github:
name: Release
needs: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -78,3 +78,80 @@ jobs:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
docker-backend:
strategy:
max-parallel: 10
matrix:
pacakge: ['server', 'import', 'simulate']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
ghcr.io/badminton-apps/core/${{ matrix.pacakge }}
tags: |
type=semver,pattern=${{steps.previoustag.outputs.tag}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Packages registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
push: true
context: code/backend/.
file: code/backend/packages/${{ matrix.pacakge }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-frontend:
strategy:
matrix:
pacakge: ['client']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
ghcr.io/badminton-apps/core/${{ matrix.pacakge }}
tags: |
type=semver,pattern=${{steps.previoustag.outputs.tag}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Packages registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
push: true
context: code/frontend/.
file: code/frontend/packages/${{ matrix.pacakge }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 95daadc

Please sign in to comment.