Merge pull request #80 from genomehubs/develop #54
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: package-goat-ui | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
package-goat-ui: | |
runs-on: ubuntu-latest | |
steps: | |
- id: genomehubs | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
repository: genomehubs/genomehubs | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- run: npm install -g pkg | |
- run: | | |
git clone -b ${{ steps.genomehubs.outputs.release }} https://github.com/genomehubs/genomehubs | |
mv static/* genomehubs/src/genomehubs-ui/src/client/static/ | |
mv files/favicon/* genomehubs/src/genomehubs-ui/src/client/favicon/ | |
mv files/components/* genomehubs/src/genomehubs-ui/src/client/views/components/ | |
mv files/html/index.html genomehubs/src/genomehubs-ui/src/client/index.html | |
- run: cd genomehubs && ./package-ui.sh | |
env: | |
GH_API_URL: "https://goat.genomehubs.org/api/v2" | |
GH_ARCHIVE: "latest 2024.03.01 2023.10.16 2023.05.18 2023.02.20 2022.11.16" | |
GH_BASENAME: "" | |
GH_SITENAME: GoaT | |
GH_SUGGESTED_TERM: Canidae | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goat-ui | |
path: ./genomehubs/dist/* | |
build-and-push-goat-ui: | |
runs-on: ubuntu-latest | |
needs: package-goat-ui | |
steps: | |
- id: genomehubs | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
repository: genomehubs/genomehubs | |
- run: | | |
git clone -b ${{ steps.genomehubs.outputs.release }} https://github.com/genomehubs/genomehubs | |
- uses: actions/download-artifact@v3 | |
with: | |
name: goat-ui | |
path: ./dist | |
- run: | | |
mv dist/genomehubs-ui-linux genomehubs/src/docker/goat/ | |
rm -r dist/* | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
with: | |
images: genomehubs/goat | |
- name: Build and push Docker image | |
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | |
with: | |
context: genomehubs/src/docker/goat | |
push: true | |
tags: genomehubs/goat:latest | |
labels: ${{ steps.meta.outputs.labels }} |