Create xcms-r-build.yml #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: 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 |