refactor: use docker actions

This commit is contained in:
Peter Galonza 2024-05-27 00:51:54 +03:00
commit 04e1ea35a9

View file

@ -18,14 +18,16 @@ jobs:
contents: read contents: read
attestations: write attestations: write
steps: steps:
- uses: actions/checkout@v4 - name: Set up Docker Buildx
- name: Build image uses: docker/setup-buildx-action@v3
run: | - name: Login to GitHub Container Registry
docker build . --no-cache \ uses: docker/login-action@v3
--file Dockerfile --tag $IMAGE_NAME --label "runnumber=${{ github.run_id }}" with:
- name: Log in to registry registry: ghcr.io
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} username: ${{ github.actor }}
- name: Push image password: ${{ secrets.GITHUB_TOKEN }}
run: | - name: Build and push
docker tag $IMAGE_NAME ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest uses: docker/build-push-action@v5
docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest with:
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest