Raise gas #94
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: Build docker and upload to registry | |
on: | |
push: | |
tags: | |
# strict semver regex | |
- v[1-9]+.[0-9]+.[0-9]+* # allows prerelease tags | |
jobs: | |
build-and-push: | |
name: build-and-push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo snap install doctl | |
sudo snap connect doctl:dot-docker | |
- name: Configure auth for Digital Ocean | |
run: | | |
doctl auth init -t ${{ secrets.CIRCLES_CI_DO_TOKEN }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get ref | |
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}">> $GITHUB_ENV | |
- name: Digital Ocean Registry login | |
run: | | |
doctl registry login | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: | | |
registry.digitalocean.com/circles-registry/safe-relay-service:${{ env.RELEASE_VERSION }} | |
joincircles/safe-relay-service:latest | |
joincircles/safe-relay-service:${{ env.RELEASE_VERSION }} |