Skip to content

Commit

Permalink
update actions versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gvkhna committed Mar 30, 2024
1 parent 84d256c commit 28cfde4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,33 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Extract Version from Dockerfile
id: docker_meta
run: |
VERSION_LABEL=$(grep 'org.opencontainers.image.version' ./Dockerfile | cut -d '"' -f 2)
echo "::set-output name=VERSION::$VERSION_LABEL"
echo "VERSION=$VERSION_LABEL" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand Down

0 comments on commit 28cfde4

Please sign in to comment.