Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Nov 4, 2024
1 parent 3c39449 commit d9178cd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/manual_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get repository lowercase
run: |
export REPOSITORY=${{ github.repository }}
echo "REPOSITORY_LOWER=$(echo "$REPOSITORY" | tr "[:upper:]" "[:lower:]")" >>${GITHUB_ENV}
echo "REPOSITORY_LOWER=${{ env.REPOSITORY_LOWER }}"
- name: Build latest image
run: |
sed -i "s/:latest/:manually_triggered_build_amd64/g" Dockerfile
docker build -t ghcr.io/${{ github.repository }}/valhalla:manually_triggered_build_amd64 .
docker push ghcr.io/${{ github.repository }}/valhalla:manually_triggered_build_amd64
docker build -t ghcr.io/${{ env.REPOSITORY_LOWER }}/valhalla:manually_triggered_build_amd64 .
docker push ghcr.io/${{ env.REPOSITORY_LOWER }}/valhalla:manually_triggered_build_amd64
8 changes: 7 additions & 1 deletion .github/workflows/manual_build_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get repository lowercase
run: |
export REPOSITORY=${{ github.repository }}
echo "REPOSITORY_LOWER=$(echo "$REPOSITORY" | tr "[:upper:]" "[:lower:]")" >>${GITHUB_ENV}
echo "REPOSITORY_LOWER=${{ env.REPOSITORY_LOWER }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -25,4 +31,4 @@ jobs:
- name: Build latest image
run: |
sed -i "s/:latest/:manually_triggered_build_arm64/g" Dockerfile
docker buildx build --push --platform linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:manually_triggered_build_arm64 .
docker buildx build --push --platform linux/arm64 --tag ghcr.io/${{ env.REPOSITORY_LOWER }}/valhalla:manually_triggered_build_arm64 .
8 changes: 7 additions & 1 deletion .github/workflows/publish_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get repository lowercase
run: |
export REPOSITORY=${{ github.repository }}
echo "REPOSITORY_LOWER=$(echo "$REPOSITORY" | tr "[:upper:]" "[:lower:]")" >>${GITHUB_ENV}
echo "REPOSITORY_LOWER=${{ env.REPOSITORY_LOWER }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -24,4 +30,4 @@ jobs:

- name: Build and push images
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:latest .
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ env.REPOSITORY_LOWER }}/valhalla:latest .
8 changes: 7 additions & 1 deletion .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get repository lowercase
run: |
export REPOSITORY=${{ github.repository }}
echo "REPOSITORY_LOWER=$(echo "$REPOSITORY" | tr "[:upper:]" "[:lower:]")" >>${GITHUB_ENV}
echo "REPOSITORY_LOWER=${{ env.REPOSITORY_LOWER }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -29,4 +35,4 @@ jobs:

- name: Build container image
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:${{ steps.extract_branch.outputs.branch }} .
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ env.REPOSITORY_LOWER }}/valhalla:${{ steps.extract_branch.outputs.branch }} .

0 comments on commit d9178cd

Please sign in to comment.