Skip to content

Commit 2a8a47f

Browse files
dependabot[bot]Ryan Zhang
authored andcommitted
chore: bump docker/login-action from 3.3.0 to 3.4.0 (Azure#1084)
1 parent d511eab commit 2a8a47f

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: publish_images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
create:
8+
# Publish semver tags as releases.
9+
tags: [ 'v*.*.*' ]
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
env:
16+
REGISTRY: ghcr.io
17+
HUB_AGENT_IMAGE_NAME : hub-agent
18+
HUB_AGENT_IMAGE_VERSION: main
19+
MEMBER_AGENT_IMAGE_NAME: member-agent
20+
MEMBER_AGENT_IMAGE_VERSION: main
21+
REFRESH_TOKEN_IMAGE_NAME: refresh-token
22+
REFRESH_TOKEN_IMAGE_VERSION: main
23+
24+
jobs:
25+
export-registry:
26+
runs-on: ubuntu-20.04
27+
outputs:
28+
registry: ${{ steps.export.outputs.registry }}
29+
steps:
30+
- id: export
31+
run: |
32+
# registry must be in lowercase
33+
echo "registry=$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr [:upper:] [:lower:])" >> $GITHUB_OUTPUT
34+
publish-images:
35+
needs: export-registry
36+
env:
37+
REGISTRY: ${{ needs.export-registry.outputs.registry }}
38+
runs-on: ubuntu-20.04
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
submodules: true
43+
fetch-depth: 0
44+
- name: Set image version for a new release
45+
if: startsWith(github.ref, 'refs/tags/')
46+
run: |
47+
echo "HUB_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
48+
echo "MEMBER_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
49+
echo "REFRESH_TOKEN_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
50+
- name: Login to ${{ env.REGISTRY }}
51+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
52+
with:
53+
registry: ${{ env.REGISTRY }}
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
56+
- name: Build ${{ env.HUB_AGENT_IMAGE_NAME}}
57+
run: |
58+
make docker-build-hub-agent
59+
env:
60+
REGISTRY: ${{ env.REGISTRY}}
61+
IMAGE_NAME: ${{ env.HUB_AGENT_IMAGE_NAME}}
62+
IMAGE_VERSION: ${{ env.HUB_AGENT_IMAGE_VERSION }}
63+
- name: Build ${{ env.MEMBER_AGENT_IMAGE_NAME}}
64+
run: |
65+
make docker-build-member-agent
66+
env:
67+
REGISTRY: ${{ env.REGISTRY}}
68+
IMAGE_NAME: ${{ env.MEMBER_AGENT_IMAGE_NAME}}
69+
IMAGE_VERSION: ${{ env.MEMBER_AGENT_MIMAGE_VERSION }}
70+
71+
- name: Build ${{ env.REFRESH_TOKEN_IMAGE_NAME}}
72+
run: |
73+
make docker-build-refresh-token
74+
env:
75+
IMAGE_NAME: ${{ env.REFRESH_TOKEN_IMAGE_NAME}}
76+
IMAGE_VERSION: ${{ env.REFRESH_TOKEN_MIMAGE_VERSION }}

0 commit comments

Comments
 (0)