mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 23:42:32 +01:00
0c3dd6b7e2
Changed the repository for pushing the docker image to GHCR from `ghcr.io/cp6/my-idlers` to `ghcr.io/hra42/my-idlers-arm64` in order to align with the updated repository naming convention.
30 lines
835 B
YAML
30 lines
835 B
YAML
on:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build, push, and deploy
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build container image
|
|
platforms: linux/amd64,linux/arm64
|
|
run: |
|
|
docker build \
|
|
--tag ghcr.io/hra42/my-idlers-arm64:$(echo $GITHUB_SHA | head -c7) \
|
|
--tag ghcr.io/hra42/my-idlers-arm64:latest \
|
|
.
|
|
- name: Container registry login
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
|
|
|
- name: Push image to GHCR
|
|
if: github.ref == 'refs/heads/main'
|
|
run: |
|
|
docker push ghcr.io/hra42/my-idlers-arm64:$(echo $GITHUB_SHA | head -c7)
|
|
docker push ghcr.io/hra42/my-idlers-arm64:latest
|