Skip to content

fix release pipeline #8

fix release pipeline

fix release pipeline #8

Workflow file for this run

name: Docker
on:
push:
tags:
- "*"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Create RELEASE.txt
run: |
echo "GIT_COMMIT=${{ github.sha }}" > RELEASE.txt
echo "VERSION=${{ github.ref_name }}" >> RELEASE.txt
cat RELEASE.txt
- name: Login to GitHub registry
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Build and push Docker container to GitHub registry
uses: docker/build-push-action@v5
with:
context: .
push: true
labels: |
git_commit=${{ github.sha }}
version=${{ github.ref_name }}
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.repository_owner == 'gridscale'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
if: github.repository_owner == 'gridscale'
with:
context: .
push: true
labels: |
git_commit=${{ github.sha }}
version=${{ github.ref_name }}
tags: |
${{ github.repository }}:latest
${{ github.repository }}:${{ github.ref_name }}