version bump 0.99.10 #2
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: Build shiny Docker image and generate Galaxy wrapper | |
on: | |
workflow_dispatch: {} | |
push: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Extract metadata for container image | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: | | |
type=raw,value={{branch}} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
platforms: linux/amd64 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push container image to ghcr | |
uses: docker/build-push-action@v4 | |
with: | |
file: Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64 | |
- name: Set variables | |
id: vars | |
run: | | |
echo "container=${{ steps.meta.outputs.tags }}" >> $GITHUB_OUTPUT | |
echo "source=https://github.com/${{github.repository}}" >> $GITHUB_OUTPUT | |
NAME="$(echo '${{github.repository}}' | awk -F'/' '{print $2}')" | |
echo "name=$NAME" >> $GITHUB_OUTPUT | |
echo "id=$(echo $NAME | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | |
- name: Generate wrapper | |
run: | | |
cp .github/scripts/galaxy-wrapper-template.xml galaxy-wrapper.xml | |
sed -i 's#{{{CONTAINER}}}#${{steps.vars.outputs.container}}#g' galaxy-wrapper.xml | |
sed -i 's#{{{SOURCE}}}#${{steps.vars.outputs.source}}#g' galaxy-wrapper.xml | |
sed -i 's#{{{NAME}}}#${{steps.vars.outputs.name}}#g' galaxy-wrapper.xml | |
sed -i 's#{{{ID}}}#${{steps.vars.outputs.id}}#g' galaxy-wrapper.xml | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add galaxy-wrapper.xml | |
git commit -m "Update Galaxy Wrapper $(TZ=EST date '+%Y-%m-%d_%H-%M')" | |
git push |