Skip to content

fix: integration.

fix: integration. #21

Workflow file for this run

name: Docker Publish
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout the agora-token-service repo
uses: actions/checkout@v2
with:
repository: AgoraIO-Community/agora-token-service
ref: ${{ env.RELEASE_VERSION }}
path: agora-token-service
- name: Copy our Dockerfile
run: cp Dockerfile agora-token-service/
- name: Ensure ./cmd/main.go exists.
working-directory: agora-token-service
run: |
if [ ! -f ./cmd/main.go ]; then
mkdir -p ./cmd
cp ./main.go ./cmd/main.go
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Remove the version prefix from the tag, eg: v1.0.0 -> 1.0.0
- name: Docker Tag
run: echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
with:
context: agora-token-service
push: true
tags: iamriajul/agora-token-service:${{ env.RELEASE_VERSION }},iamriajul/agora-token-service:latest
platforms: linux/amd64,linux/arm64