Fuck it
All checks were successful
Create and publish Docker image / docker (push) Successful in 3m13s

This commit is contained in:
2025-01-04 17:06:29 +03:30
parent d5ae55c52d
commit 8251fdefdb

View File

@@ -1,4 +1,7 @@
name: release #
name: Create and publish Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
@@ -10,33 +13,35 @@ env:
jobs: jobs:
docker: docker:
name: Build and push Docker image
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions: permissions:
contents: read
packages: write packages: write
attestations: write
id-token: write
#
steps: steps:
- uses: actions/checkout@v4 - name: Checkout repository
- name: Setup Docker Buildx uses: actions/checkout@v4
uses: docker/setup-buildx-action@v2 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
with: - name: Log in to the Container registry
install: true uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
- name: Log in to Container registry
uses: docker/login-action@v2
with: with:
registry: git.mahdium.ir registry: git.mahdium.ir
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
- name: Extract Docker metadata # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with: with:
images: git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot images: git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot
- name: Build and push Docker image
uses: docker/build-push-action@v4 - name: Build and push
uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
# tags: git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot${{gitea.sha}},git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot:latest tags: |
# labels: ${{ steps.meta.outputs.labels }} git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}