Merge pull request #201 from combiz/dev #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: R GitHub Actions dev-nf | |
on: | |
push: | |
branches: | |
- master | |
- nfancy-patch-1 | |
jobs: | |
R-CMD-check: | |
name: R-CMD-check | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
RGL_USE_NULL: TRUE | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
install-r: false | |
- name: Get R package version | |
run: | | |
version=$(grep Version DESCRIPTION | grep -o "[0-9.]\+") | |
echo "packageVersion=${version}" >> $GITHUB_ENV | |
shell: bash {0} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
load: true | |
file: ./Dockerfile | |
tags: | | |
nfancy/scflow:latest | |
nfancy/scflow:${{ env.packageVersion }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: push service | |
run: | | |
docker push nfancy/scflow:latest | |
docker push nfancy/scflow:${{ env.packageVersion }} |