push velero image #4
This file contains hidden or 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
| name: Push docker Image to GHCR | |
| on: | |
| push: | |
| branches: | |
| - airgapped # Trigger on push to main branch, modify as needed | |
| jobs: | |
| docker-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull Velero image from Docker Hub | |
| run: docker pull docker.io/velero/velero:v1.16.1 | |
| - name: Tag image for GHCR | |
| run: docker tag docker.io/velero/velero:v1.16.1 ghcr.io/obmondo/velero:v1.16.1 | |
| - name: Push image to GHCR | |
| run: docker push ghcr.io/obmondo/velero:v1.16.1 |