Skip to content

test instruction

test instruction #27

Workflow file for this run

name: docker-release
on:
push:
tags:
- '*'
pull_request:
branches:
- "master"
env:
REGISTRY: docker.io
IMAGE_NAME: rnanue
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v2
- name: login to dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Determine target repository and version
id: extract_version
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
REPO="cobirna/rnanue" # production repo
TAGS="$REPO:$VERSION,$REPO:latest" # push both tags
else
VERSION="dev" # development/test tag
REPO="cobirna/rnanue-dev" # development/test repo for PRs
TAGS="$REPO:latest" # only update 'latest' tag
fi
echo "VERSION=$VERSION"
echo "REPO=$REPO"
echo "TAGS=$TAGS"
echo "TAGS=$TAGS" >> $GITHUB_ENV
- name: build and push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}"
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ env.TAGS }}