my-idlers/.github/workflows/main.yml
Henry Rausch 27a0cd494a
Update tags in GitHub Actions workflow
This commit updates the tags in the GitHub Actions workflow for building Docker images. The previous tags `ghcr.io/cp6/my-idlers` are replaced with `ghcr.io/hra42/my-idlers-arm64`. This change ensures that the correct tags are used for the Docker image.
2023-11-16 23:38:46 +01:00

30 lines
819 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/cp6/my-idlers:$(echo $GITHUB_SHA | head -c7)
docker push ghcr.io/cp6/my-idlers:latest