Updating Freyja #50
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: Update Freyja | |
on: | |
workflow_dispatch: | |
run-name: Updating Freyja | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest release | |
uses: rez0n/actions-github-release@main | |
id: latest_release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: andersen-lab/Freyja | |
type: "stable" | |
- uses: actions/checkout@v3 | |
- name: Remove V | |
id: strip | |
run: | | |
version=$(echo "${{ steps.latest_release.outputs.release }}" | sed 's/V//g' | sed 's/v//g' ) | |
echo "The version is $version" | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: pull repo | |
uses: actions/checkout@v3 | |
- name: check paths | |
run: ls && ls ./freyja | |
- name: Get current date | |
id: date | |
run: | | |
date=$(date '+%Y-%m-%d') | |
echo "the date is $date" | |
echo "date=$date" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Quay | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build and push to Quay | |
id: build | |
uses: docker/build-push-action@v3 | |
with: | |
file: ./freyja/Dockerfile | |
build-args: FREYJA_GITHUB_SOFTWARE_VERSION=${{ steps.strip.outputs.version }} | |
push: true | |
tags: quay.io/uphl/freyja:${{ steps.strip.outputs.version }}-${{ steps.date.outputs.date }} | |
- name: Build and push latest tag to Quay | |
id: latest | |
uses: docker/build-push-action@v3 | |
with: | |
file: ./freyja/Dockerfile | |
build-args: FREYJA_GITHUB_SOFTWARE_VERSION=${{ steps.strip.outputs.version }} | |
push: true | |
tags: quay.io/uphl/freyja:latest | |