Skip to content

Commit 82e99e9

Browse files
committed
updating git config
1 parent f368991 commit 82e99e9

File tree

1 file changed

+11
-44
lines changed

1 file changed

+11
-44
lines changed

.github/workflows/build-image.yaml

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,19 @@
11
name: Build image
22

3+
permissions: read-all
4+
35
on:
46
push:
5-
branches: ["main"]
7+
branches: [ "master" ]
68
tags:
7-
- v[0-9]+.[0-9]+.[0-9]+ # Semver Release (non-prerelease)
9+
- 'v*.*.*' # glob for semver tags (including prereleases)
810
pull_request:
9-
branches: [main]
11+
branches: [ master ]
1012

1113
jobs:
12-
docker:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
with:
18-
submodules: "recursive"
19-
- name: Docker meta
20-
id: meta
21-
uses: docker/metadata-action@v5
22-
with:
23-
images: hub.opensciencegrid.org/macrostrat/web
24-
# New: apply the 'latest' tag to non-prerelease semver tags
25-
tags: |
26-
type=raw,value=sha-{{sha}}
27-
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')}}
28-
type=raw,value=latest-itb,enable=${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')}}
29-
type=raw,value=latest-,suffix={{date 'YYYYMMDDHHmmss'}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')}}
30-
type=raw,value=latest-itb-,suffix={{date 'YYYYMMDDHHmmss'}}
31-
type=ref,event=pr
32-
type=ref,event=branch,suffix=-{{date 'YYYYMMDDHHmmss'}}
33-
type=semver,pattern={{version}}
34-
flavor: |
35-
latest=false
36-
- name: Set up Docker BuildX
37-
uses: docker/setup-buildx-action@v2
38-
- name: Login to OSG DockerHub
39-
uses: docker/login-action@v2
40-
with:
41-
registry: hub.opensciencegrid.org
42-
username: ${{ vars.HARBOR_CLI_NAME }}
43-
password: ${{ secrets.HARBOR_CLI_SECRET }}
44-
- name: Build and push
45-
uses: docker/build-push-action@v5
46-
with:
47-
context: .
48-
push: true
49-
tags: ${{ steps.meta.outputs.tags }}
50-
labels: ${{ steps.meta.outputs.labels }}
51-
cache-from: type=gha
52-
cache-to: type=gha,mode=max
14+
call-build-image:
15+
uses: UW-Macrostrat/build-push/.github/workflows/build-push.yaml@main
16+
secrets: inherit
17+
with:
18+
context: .
19+
image: 'hub.opensciencegrid.org/macrostrat/rockd-website'

0 commit comments

Comments
 (0)