Skip to content

Commit

Permalink
let's try this interesting thing
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Dec 15, 2023
1 parent ed29402 commit fecf5cc
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions .github/workflows/on_push_to_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ env:
FS_IMAGE: ghcr.io/${{ github.repository }}

jobs:
set-version:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
with:
# need to get everything so that 'git describe' works
fetch-depth: 0

- run: |
echo "export GIT_COMMIT=$(git rev-parse --short HEAD)" >> vars.sh
echo "export GIT_TAG=$(git describe)" >> vars.sh
- uses: actions/upload-artifact@v3
with:
name: vars.sh
path: vars.sh

release-docker:
runs-on: ubuntu-22.04

Expand All @@ -30,19 +48,18 @@ jobs:
if: matrix.platform == 'linux/arm64'

- uses: actions/checkout@v3
with:
# need to get everything so that 'git describe' works
fetch-depth: 0

- uses: wistia/[email protected]

- uses: earthly/actions-setup@v1
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" }

- uses: actions/download-artifact@v3
with:
name: vars.sh

- name: extract sha
run: |
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe)" >> $GITHUB_ENV
run: source vars.sh

- name: login to registry
uses: docker/login-action@v1
Expand All @@ -57,8 +74,8 @@ jobs:
--platform ${{ matrix.platform.earthly }} \
--push \
+docker \
--GIT_TAG=${{ env.GIT_TAG }} \
--GIT_COMMIT=${{ env.GIT_COMMIT }} \
--GIT_TAG=${GIT_TAG} \
--GIT_COMMIT=${GIT_COMMIT} \
--IMAGE_NAME=${{ env.FS_IMAGE }}:${{ env.GIT_TAG }}
release-multiarch:
Expand All @@ -71,21 +88,23 @@ jobs:
packages: write

steps:
- name: extract sha
run: |
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe)" >> $GITHUB_ENV
- name: login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v3
with:
name: vars.sh

- name: extract sha
run: source vars.sh

- uses: int128/docker-manifest-create-action@v1
with:
tags: ghcr.io/${{ github.repository_owner }}/kubechecks:${{ env.GIT_TAG }}
tags: ghcr.io/${{ github.repository_owner }}/kubechecks:${env.GIT_TAG}
suffixes: |
-linux-amd64
# -linux-arm64
Expand Down

0 comments on commit fecf5cc

Please sign in to comment.