Skip to content

Commit

Permalink
test: test docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk committed Feb 16, 2024
1 parent b90f440 commit 921a9c1
Showing 1 changed file with 38 additions and 46 deletions.
84 changes: 38 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
# TODO: remove this after testing
- fix-digests

permissions:
contents: write
Expand All @@ -15,20 +17,20 @@ env:
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
manifest-file: '.github/release-please-manifest.json'
# release-please:
# runs-on: ubuntu-latest
# outputs:
# release_created: ${{ steps.release.outputs.release_created }}
# tag_name: ${{ steps.release.outputs.tag_name }}
# steps:
# - uses: google-github-actions/release-please-action@v4
# id: release
# with:
# release-type: simple
# manifest-file: '.github/release-please-manifest.json'
package:
needs: [release-please]
if: ${{ needs.release-please.outputs.release_created }}
# needs: [release-please]
# if: ${{ needs.release-please.outputs.release_created }}
runs-on: ${{ matrix.OS }}
strategy:
matrix:
Expand Down Expand Up @@ -57,13 +59,13 @@ jobs:
path: ${{ matrix.local_path }}
if-no-files-found: error
retention-days: 2
- name: Upload release artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ matrix.local_path }}
# - name: Upload release artifacts
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ matrix.local_path }}
package-linux:
needs: [release-please]
if: ${{ needs.release-please.outputs.release_created }}
# needs: [release-please]
# if: ${{ needs.release-please.outputs.release_created }}
runs-on: ${{ matrix.OS }}
strategy:
matrix:
Expand Down Expand Up @@ -137,7 +139,7 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ matrix.platforms }}
name: digests
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -148,48 +150,38 @@ jobs:
path: ${{ matrix.local_path }}
if-no-files-found: error
retention-days: 2
- name: Upload release artifacts
if: ${{ matrix.platforms != 'linux/arm64/v8' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ matrix.local_path }}
# - name: Upload release artifacts
# if: ${{ matrix.platforms != 'linux/arm64/v8' }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ matrix.local_path }}
# https://docs.docker.com/build/ci/github-actions/multi-platform/
merge:
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
# if: ${{ needs.release-please.outputs.release_created }}
needs:
- release-please
# - release-please
- package-linux
steps:
- name: Download digest - linux/amd64
- name: Download digest
uses: actions/download-artifact@v4
with:
name: digests-linux/amd64
name: digests
path: /tmp/digests
- name: Download digest - linux/arm/v7
uses: actions/download-artifact@v4
with:
name: digests-linux/arm/v7
path: /tmp
- name: Download digest - linux/arm64/v8
uses: actions/download-artifact@v4
with:
name: digests-linux/arm64/v8
path: /tmp
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=${{ needs.release-please.outputs.tag_name }}
type=raw,value=latest
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=tag
# type=ref,event=pr
# type=raw,value=${{ needs.release-please.outputs.tag_name }}
# type=raw,value=latest
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit 921a9c1

Please sign in to comment.