Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix tagging #7

Merged
merged 5 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
permissions:
contents: read

env:
platforms: linux/amd64

jobs:
paths-filter:
permissions:
Expand Down Expand Up @@ -75,11 +78,12 @@ jobs:
with:
python-version: ${{ env.python_version }}
- name: Version Check
id: version
run: |
pip install --require-hashes -r .github/requirements.txt
python3 .github/scripts/version_check.py
echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_ENV
echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_OUTPUT
- name: Test Docker Image
id: test-docker
run: |
Expand Down Expand Up @@ -144,9 +148,11 @@ jobs:
with:
images: |
ghcr.io/${{ github.repository }}

- name: Set SOURCE_DATE_EPOCH
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_OUTPUT
shell: bash
id: epoch

- name: Push Docker Images
id: push-docker
Expand All @@ -155,13 +161,14 @@ jobs:
with:
context: .
file: ./contrib/container/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ env.platforms }}
push: true
sbom: true
provenance: mode=max
target: production
tags: ${{ env.docker_tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
commit_hash=${{ env.git_commit_hash }}
commit_date=${{ env.git_commit_date }}
SOURCE_DATE_EPOCH=${{ env.SOURCE_DATE_EPOCH }}
commit_hash=${{ steps.epoch.outputs.git_commit_hash }}
commit_date=${{ steps.epoch.outputs.git_commit_date }}
SOURCE_DATE_EPOCH=${{ steps.epoch.outputs.SOURCE_DATE_EPOCH }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ This project is a stripped downs version of the [InvenTree project](https://gith
Changes from upstream are listed here:
- Cleanup of repo initial setup - [#2](https://github.com/invenhost/InvenTree/pull/2)
- Set epoch - [#1](https://github.com/invenhost/InvenTree/pull/1)
- Fix up CI tagging - [#3](https://github.com/invenhost/InvenTree/pull/7)

Please always report security issues upstream and If you can to [email protected]
Loading