Skip to content

Commit

Permalink
fix image repo typo
Browse files Browse the repository at this point in the history
  • Loading branch information
muzi502 committed Aug 12, 2021
1 parent 693df5e commit 4a87385
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ name: Build nix images

on:
push:
branches: [master, release-*]
release:
branches: [master, release-*]
tags:
- 'v*'
- '[0-9]*'

env:
IMAGE_REPO: "muzi502"
IMAGE_NAME: "nixos-nix"
IMAGE_REPO: "k8sli/nixos-nix"
IMAGE_REGISTRY: "ghcr.io"

jobs:
Expand All @@ -19,11 +18,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Define image tags by current git repo tag and branch
- name: Define image tag by current git repo tag
shell: bash
run: |
git describe --tags --always | sed 's/^/IMAGE_TAG=/' >> $GITHUB_ENV
git branch --show-current | sed 's/master/latest/;s/release-//;s/^/IMAGE_TAG_BY_BRANCH=/' >> $GITHUB_ENV
run: git describe --tags --always | sed 's/^/IMAGE_TAG=/' >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand All @@ -35,16 +32,13 @@ jobs:
uses: docker/login-action@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image
run: |
docker buildx build \
--pull \
--push \
--platform="linux/amd64,linux/arm64" \
-t ${IMAGE_REGISTRY}/${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG} \
-t ${IMAGE_REGISTRY}/${IMAGE_REPO}/${IMAGE_NAME}:${IMAGE_TAG_BY_BRANCH} \
-f Dockerfile \
.
- name: Build and push images
uses: docker/build-push-action@v2
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}:${{ env.IMAGE_TAG }}

0 comments on commit 4a87385

Please sign in to comment.