Skip to content

Task/rfr 932 support object storage #156

Task/rfr 932 support object storage

Task/rfr 932 support object storage #156

Workflow file for this run

# Copyright (C) 2019-2023 Cyface GmbH - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential.
#
# Pulls the required artifacts to build and publish the Docker images.
#
# author: Armin Schnabel
# since: 1.0.0
# version: 1.0.4
name: (Test) Publish docker images
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
branches:
- main
pull_request:
branches:
- main
# Specify JARs version here.
env:
JARS_VERSION: '7.1.0-alpha2' # FIXME
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# --------------------- Data-Collector ---------------------
- name: data-collector - Download JAR
run: |
wget --user ${{ secrets.GH_PACKAGES_READ_ACCOUNT }} --password ${{ secrets.GH_PACKAGES_READ_TOKEN }} \
https://maven.pkg.github.com/cyface-de/data-collector/de/cyface/collector/${{ env.JARS_VERSION }}/collector-${{ env.JARS_VERSION }}-all.jar \
-O collector-all.jar
mv collector-all.jar collector/collector-all.jar
- name: collector - (Test) Publish Docker Image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: cyface-de/collector-docker/collector-docker
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
tag_names: true
context: collector
# only push the Docker images if this is a release (to test workflow in PRs)
no_push: ${{ !(github.event_name == 'push' && contains(github.ref, 'refs/tags/')) }}
# --------------------- Mark Release-Tag on Github ---------------------
- name: Mark release on Github
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
# Release tags of format `1.2.3-beta1 / -alpha1 / -test1` are considered a pre-release
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}