Skip to content

GH build script

GH build script #1

Workflow file for this run

name: xcms-r build
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
thermo-convert:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u aberHRML --password-stdin
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Build image
run: docker build . --build-arg GITHUB_PAT=${{ secrets.GITHUB_TOKEN }} --file thermo-raw/Dockerfile --tag xcms-r
- name: Push image
run: |
IMAGE_ID=ghcr.io/aberhrml/xcms-r
VERSION=${{ steps.date.outputs.date }}
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag thermo-convert $IMAGE_ID:$VERSION
docker tag thermo-convert $IMAGE_ID:latest
docker push $IMAGE_ID:$VERSION
docker push $IMAGE_ID:latest