Fix delete job #57
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
--- | |
name: 'Publish Docker Image' | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "charts/**/*" | |
concurrency: | |
group: ${{ github.head_ref }}-container | |
cancel-in-progress: false | |
jobs: | |
publish: | |
name: Publish | |
runs-on: self-hosted-hoprnet-small | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver: kubernetes | |
- name: Setup GCP | |
id: gcp | |
uses: hoprnet/hopr-workflows/actions/setup-gcp@master | |
with: | |
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }} | |
login-artifact-registry: 'true' | |
- name: Get package version | |
id: version | |
run: | | |
docker_tag=$(grep -A 1 "hoprd_operator" Cargo.lock | grep version | sed 's/.* "//' | sed 's/"//' | tr -d '\n') | |
echo "DOCKER_TAG=${docker_tag}" >> $GITHUB_OUTPUT | |
- name: Build container image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: | | |
europe-west3-docker.pkg.dev/hoprassociation/docker-images/hoprd-operator:${{ steps.version.outputs.DOCKER_TAG }} | |
europe-west3-docker.pkg.dev/hoprassociation/docker-images/hoprd-operator:latest | |
- name: Tag Docker version | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "HOPR CI robot" | |
git tag ${{ steps.version.outputs.DOCKER_TAG }} | |
git push origin ${{ steps.version.outputs.DOCKER_TAG }} |