Skip to content

chore(main): release 3.1.6 #22

chore(main): release 3.1.6

chore(main): release 3.1.6 #22

Workflow file for this run

name: Production Superhero Backend Pipeline
on:
push:
branches:
- main
release:
types: [created]
jobs:
release:
name: Release Pleases
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: ""
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"ci","section":"CI / CD","hidden":false},{"type":"test","section":"Testing","hidden":false},{"type":"refactor","section":"Refactorings","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
production-deploy:
name: Production Pipeline
runs-on: ubuntu-latest
needs: release
env:
ENV: "prd"
APP: "superhero-backend"
if: ${{ needs.release.outputs.release_created }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Get tags
run: git fetch --tags origin
- name: Get latest release tag
shell: bash
id: release_tag
run: echo TAG=$(git describe --tags HEAD --abbrev=0) >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-${{ env.ENV }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.ENV }}-buildx
- name: Log in to dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Extract metadata for docker
id: meta
uses: docker/metadata-action@v3
with:
images: aeternity/superhero-backend
tags: |
type=raw,value=${{ steps.release_tag.outputs.TAG }}
- name: Build and push docker image
if: |
github.event_name == 'push' ||
startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- uses: actions/checkout@v2
with:
repository: aeternity/gitops-apps-aelabs.git
token: ${{ secrets.BOT_GITHUB_TOKEN }}
ref: prd
persist-credentials: false
fetch-depth: 0
- name: Production Deploy
uses: aeternity/ae-github-actions/argocd-deploy@v4
with:
url-prefix: ${{ steps.release_tag.outputs.TAG }}
env: ${{ env.ENV }}
app: ${{ env.APP }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: aeternity/gitops-apps-aelabs
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
branch: prd