mirror of
https://github.com/5etools-mirror-2/5etools-img.git
synced 2025-12-17 08:23:22 -06:00
Compare commits
15 Commits
main
...
02d7c8c0ef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02d7c8c0ef | ||
|
|
713b56d4e2 | ||
|
|
3af7d71726 | ||
|
|
a12413fa58 | ||
|
|
a970a6294a | ||
|
|
18d17209b2 | ||
|
|
5048871058 | ||
|
|
9ae408de25 | ||
|
|
b3ba187884 | ||
|
|
4638c1af7a | ||
|
|
39c0995504 | ||
|
|
340945a77d | ||
|
|
5ec8e31615 | ||
|
|
e4085c323f | ||
|
|
60f6061ba8 |
31
.github/workflows/main.yml
vendored
31
.github/workflows/main.yml
vendored
@@ -54,21 +54,34 @@ jobs:
|
|||||||
|
|
||||||
echo "IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
|
echo "IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
|
||||||
|
|
||||||
# region See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
|
# region See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
|
||||||
- name: Build Image
|
- name: Use QEMU
|
||||||
run: |
|
uses: docker/setup-qemu-action@master
|
||||||
docker build -t $IMAGE_NAME .
|
with:
|
||||||
|
platforms: all
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@master
|
||||||
|
|
||||||
- name: Log In to Registry
|
- name: Log In to Registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Push Image
|
- name: Build the docker image
|
||||||
|
uses: docker/build-push-action@master
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
platforms: linux/arm64,linux/amd64
|
||||||
|
push: false
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
echo IMAGE_ID=$IMAGE_ID
|
||||||
echo IMAGE_VERSION=$IMAGE_VERSION
|
echo IMAGE_VERSION=$IMAGE_VERSION
|
||||||
docker tag $IMAGE_NAME $IMAGE_ID:$IMAGE_VERSION
|
docker tag $IMAGE_ID $IMAGE_ID:$IMAGE_VERSION
|
||||||
# Always tag latest when pushing a tag, as we don't expect to ever merge old tags
|
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && docker tag $IMAGE_NAME $IMAGE_ID:latest
|
|
||||||
docker push $IMAGE_ID:$IMAGE_VERSION
|
docker push $IMAGE_ID:$IMAGE_VERSION
|
||||||
docker push $IMAGE_ID:latest
|
|
||||||
|
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user