-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow for pushing docker image
- Loading branch information
David Dahl
committed
Aug 23, 2024
1 parent
3047475
commit 03a172d
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Push Image to ghcr.io | ||
run-name: ${{ github.actor }} is running this workflow | ||
on: [push] | ||
jobs: | ||
Pull-From_Gitlab: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Login to GitLab | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: registry.gitlab.com | ||
username: ${{ secrets.GITLAB_USERNAME }} | ||
password: ${{ secrets.GITLAB_PASSWORD }} | ||
- | ||
- name: Pull Gitlab Image | ||
- run: docker pull registry.gitlab.com/f5/greenhouse/apps/seven-layer-cake-collector/custom_otel_coleector:latest | ||
- | ||
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/custom_otel_coleector:latest ghcr.io/f5devcentral/application-study-tool/custom_otel_collector:latest | ||
- run: docker push ghcr.io/f5devcentral/application-study-tool/custom_otel_collector:latest | ||
|
||
Explore-GitHub-Actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |