-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (46 loc) · 1.59 KB
/
runtime.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Runtime image
on:
push:
branches: [master]
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- 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@v3
with:
name: curator
path: artifacts/curator.bz2
- name: Upload casa-curator executable
uses: actions/upload-artifact@v3
with:
name: casa-curator
path: artifacts/casa-curator.bz2
- name: Publish artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/*
tag: commit-${{ github.sha }}
overwrite: true
file_glob: true