Fixed call to the correct accounts endpoint #10
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: Release | |
on: | |
push: | |
branches: [ main ] | |
env: | |
REPO: ${{ github.event.repository.name }} | |
IMAGE_BASE: ${{ secrets.DOCKER_REGISTRY }}/${{ github.event.repository.name }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.tag.outputs.new_tag }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Generate new tag | |
id: tag | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tag_prefix: '' | |
- name: Login to container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.DOCKER_REGISTRY }} | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASS }} | |
- name: Build and publish image | |
env: | |
IMAGE_NAME: "${{ env.IMAGE_BASE }}:${{ steps.tag.outputs.new_tag }}" | |
run: | | |
docker build -t ${IMAGE_NAME} . | |
docker push ${IMAGE_NAME} | |
release: | |
needs: build | |
runs-on: on-prem | |
environment: 'Prod' | |
steps: | |
- name: Perform rolling update | |
run: | | |
kubectl -n default set image deploy/${REPO} ${REPO}=${IMAGE_BASE}:${{ needs.build.outputs.tag }} | |
kubectl -n default rollout status deploy/${REPO} |