bibibi12345 commited on
Commit
995e436
·
2 Parent(s): a6fc424 ca1f598

Merge branch 'main' of https://github.com/gzzhongqi/vertex2openai

Browse files
Files changed (1) hide show
  1. .github/workflows/docker-image.yml +7 -3
.github/workflows/docker-image.yml CHANGED
@@ -1,23 +1,27 @@
1
- name: Docker Image CI
2
  permissions: write-all
3
  on:
4
  push:
5
  branches: [ "main" ]
6
  pull_request:
7
  branches: [ "main" ]
 
8
 
9
  jobs:
10
  build:
11
  runs-on: ubuntu-latest
12
 
13
  steps:
 
 
 
14
  - uses: actions/checkout@v4
15
 
16
  - name: Log in to GitHub Container Registry
17
  run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
18
 
19
  - name: Build the Docker image
20
- run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/vertex2openai:latest
21
 
22
  - name: Push the Docker image
23
- run: docker push ghcr.io/${{ github.repository_owner }}/vertex2openai:latest
 
1
+ name: GHCR CI
2
  permissions: write-all
3
  on:
4
  push:
5
  branches: [ "main" ]
6
  pull_request:
7
  branches: [ "main" ]
8
+ workflow_dispatch:
9
 
10
  jobs:
11
  build:
12
  runs-on: ubuntu-latest
13
 
14
  steps:
15
+ - name: lowercase repository name
16
+ run: echo "IMAGE_NAME=${GITHUB_REPOSITORY@L}" >> ${GITHUB_ENV}
17
+
18
  - uses: actions/checkout@v4
19
 
20
  - name: Log in to GitHub Container Registry
21
  run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
22
 
23
  - name: Build the Docker image
24
+ run: docker build . --file Dockerfile --tag ghcr.io/${{ env.IMAGE_NAME }}:latest
25
 
26
  - name: Push the Docker image
27
+ run: docker push ghcr.io/${{ env.IMAGE_NAME }}:latest