forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.68 KB
/
build_anvil_image.yaml
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
name: Build AnVIL Image
on: push
jobs:
test:
name: Build image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set branch name
id: branch
run: echo "name=$(BRANCH_NAME=${GITHUB_REF##*/}; echo ${BRANCH_NAME/release_/}-auto)" >> $GITHUB_OUTPUT
- name: Get Galaxy version from branch name
id: version
run: echo "number=$(BRANCH_NAME=${GITHUB_REF##*/}; echo ${BRANCH_NAME/release_/})" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to quay.io
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKER_REGISTRY_URL: quay.io
- run: docker build . --build-arg GIT_COMMIT=$(git rev-parse HEAD) --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg IMAGE_TAG=${{ steps.version.outputs.number }} -t galaxy/galaxy-anvil:${{ steps.branch.outputs.name }} -f .k8s_ci.Dockerfile
- name: Push to Docker Hub with branch name
uses: actions-hub/docker@master
with:
args: push galaxy/galaxy-anvil:${{ steps.branch.outputs.name }}
- run: docker tag galaxy/galaxy-anvil:${{ steps.branch.outputs.name }} quay.io/galaxyproject/galaxy-anvil:${{ steps.branch.outputs.name }}
- name: Push to quay.io with branch name
uses: actions-hub/docker@master
with:
args: push quay.io/galaxyproject/galaxy-anvil:${{ steps.branch.outputs.name }}