-
Notifications
You must be signed in to change notification settings - Fork 10
37 lines (37 loc) · 1.63 KB
/
push-image.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
name: Push Image to ghcr.io
run-name: ${{ github.actor }} is running this workflow
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
Pull-From_Gitlab:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: "actions/checkout@v1"
- name: Login to GitLab
uses: docker/login-action@v3
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_PASSWORD }}
- name: Set variables
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Pull Gitlab Image
run: docker pull registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to Github
run:
|
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:${{ env.VERSION }}
docker tag registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/otel_custom_collector:${{ env.VERSION }} ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:latest
docker push ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:${{ env.VERSION }}
docker push ghcr.io/f5devcentral/application-study-tool/otel_custom_collector:latest