-
Notifications
You must be signed in to change notification settings - Fork 30
65 lines (52 loc) · 1.52 KB
/
release.yml
File metadata and controls
65 lines (52 loc) · 1.52 KB
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
57
58
59
60
61
62
63
64
65
name: Publish release
permissions: {}
# Only release on a new tag that is a version number.
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
publish_service_containers:
name: Publish all images
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
id: login-ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download, Tag, and Push Service Images
run: |
TAG=${GITHUB_REF/refs\/tags\//}
IMAGES=(
ghcr.io/datadog/storedog/backend
ghcr.io/datadog/storedog/discounts
ghcr.io/datadog/storedog/ads-python
ghcr.io/datadog/storedog/ads-java
ghcr.io/datadog/storedog/nginx
ghcr.io/datadog/storedog/frontend
ghcr.io/datadog/storedog/dbm
ghcr.io/datadog/storedog/postgres
ghcr.io/datadog/storedog/puppeteer
)
for i in "${IMAGES[@]}"
do
echo "$i"
docker pull "$i":latest
docker tag "$i":latest "$i":$TAG
docker push "$i":$TAG
done
echo "All done"