ci: update all actions to the latest version

Change-Id: Ib799183ea5d613b784f275213b4b2f0f97b80cb8
This commit is contained in:
Davide Pesavento committed 2023-09-20 23:28:11 -04:00
1 parent aed282d565
commit 273e80f1fe
1 file changed
+12 -9
+12 -9
View File
@@ -1,15 +1,17 @@
name: Create and publish a Docker image
name: Publish Docker image
on:
push:
branches: ['master']
branches:
- master
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
@@ -17,25 +19,26 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v2
- name: Login to ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
pull: true
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}