Mobilizon-Reshare-condividi.../.github/workflows/release.yml

68 lines
2.1 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: Publish release to Docker Hub
# Controls when the workflow will run
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Install GNU Guix
uses: PromyLOPh/guix-install-action@v1
# Runs a set of commands using the runners shell
- name: Build image
run: scripts/build_docker_image.sh
- name: Upload pack (Docker)
uses: actions/upload-artifact@v2
with:
name: mobilizon-reshare-docker
path: docker-image.tar.gz
publish:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get release tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Download image
uses: actions/download-artifact@v2
with:
name: mobilizon-reshare-docker
- name: Publish to Docker Hub
uses: fishinthecalculator/publish-docker-image-action@v0.1.10
env:
IMAGE_TAG: ${{ steps.vars.outputs.tag }}
IMAGE_NAME_TAG: mobilizon-reshare-scheduler:latest
with:
name: twcita/mobilizon-reshare
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
image: docker-image.tar.gz