-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (41 loc) · 1.5 KB
/
build-sqoop.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
# Ref: https://github.com/dmwm/dbs2go/blob/master/.github/workflows/build.yml
name: Build
on:
push:
tags:
- 'sqoop-*.*.*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.20
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get git tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: Build sqoop image
run: |
echo Image tag: ${{ steps.get_tag.outputs.tag }}
curl -ksLO https://raw.githubusercontent.com/dmwm/CMSKubernetes/master/docker/sqoop/Dockerfile
sed -i -e "s,ENV CMSMON_TAG=.*,ENV CMSMON_TAG=${{steps.get_tag.outputs.tag}},g" Dockerfile
docker build . --tag docker.pkg.github.com/dmwm/sqoop/sqoop
docker tag docker.pkg.github.com/dmwm/sqoop/sqoop registry.cern.ch/cmsmonitoring/sqoop
- name: Login to registry.cern.ch
uses: docker/[email protected]
with:
registry: registry.cern.ch
username: ${{ secrets.CERN_LOGIN }}
password: ${{ secrets.CERN_TOKEN }}
- name: Publish sqoop image to registry.cern.ch
uses: docker/build-push-action@v1
with:
username: ${{ secrets.CERN_LOGIN }}
password: ${{ secrets.CERN_TOKEN }}
registry: registry.cern.ch
repository: cmsmonitoring/sqoop
tag_with_ref: true