Release #51
Workflow file for this run
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: | |
release: | |
types: [released] | |
jobs: | |
service: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout & fetch repository | |
uses: actions/checkout@v4 | |
- name: Set up GO | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache-dependency-path: service | |
- name: Install & Build binary for service | |
working-directory: service | |
run: | | |
go version | |
make build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: service | |
path: service/build | |
web: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout & fetch repository | |
uses: actions/checkout@v4 | |
- name: Set up Node (yarn, npm) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install & Build web | |
working-directory: web | |
run: | | |
node -v | |
npm -v | |
npm install | |
npm run build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: web | |
path: web/build | |
publish: | |
runs-on: ubuntu-latest | |
needs: [service, web] | |
environment: production | |
steps: | |
- name: Checkout & fetch repository | |
uses: actions/checkout@v4 | |
- name: Download Service Artifacts | |
uses: actions/download-artifact@master | |
with: | |
name: service | |
path: service/build | |
- name: Download Web Artifacts | |
uses: actions/download-artifact@master | |
with: | |
name: web | |
path: web/build | |
- name: Display structure of service files | |
run: ls -l | |
working-directory: service/build | |
- name: Display structure of web files | |
run: ls -l | |
working-directory: web/build | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Login to DockerHub Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ github.token }} | |
- name: Build and push docker | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
IVORY_VERSION_TAG=${{ github.ref_name }} | |
IVORY_VERSION_COMMIT=${{ github.sha }} | |
tags: | | |
aelsergeev/ivory:latest | |
aelsergeev/ivory:${{ github.ref_name }} | |
ghcr.io/veegres/ivory:latest | |
ghcr.io/veegres/ivory:${{ github.ref_name }} |