Skip to content

Merge pull request #34 from juhp/pid1-20 #21

Merge pull request #34 from juhp/pid1-20

Merge pull request #34 from juhp/pid1-20 #21

Workflow file for this run

name: Runtime image
on:
push:
branches: [master]
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Log into Github registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build image
run: docker build . -f .github/workflows/Dockerfile.runtime --tag image
- name: Push to Docker Hub
run: |
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login --username fpcojenkins --password-stdin
IMAGE_ID=fpco/curator
docker tag image $IMAGE_ID
docker push $IMAGE_ID
IMAGE_ID=$IMAGE_ID:$GITHUB_SHA
docker tag image $IMAGE_ID
docker push $IMAGE_ID
- name: Extract artifacts
run: |
mkdir -p artifacts
docker run -v $(pwd)/artifacts:/artifacts fpco/curator:$GITHUB_SHA bash -c 'cp -v /usr/local/bin/* /artifacts'
bzip2 artifacts/*
- name: Upload curator executable
uses: actions/upload-artifact@v1
with:
name: curator
path: artifacts/curator.bz2
- name: Upload casa-curator executable
uses: actions/upload-artifact@v1
with:
name: casa-curator
path: artifacts/casa-curator.bz2
- name: Publish artifacts
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/*
tag: commit-${{ github.sha }}
overwrite: true
file_glob: true