Initial release #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Docker Image | |
on: | |
push: | |
tags: | |
- 'v*' # Udløser workflowet ved tags, der matcher mønsteret v* | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # For at læse repository-indhold | |
packages: write # For at uploade Docker-image til GHCR | |
steps: | |
- name: Tjek repository ud | |
uses: actions/checkout@v3 | |
- name: Log ind på GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Opsæt Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Byg og upload Docker-image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.ref_name }} | |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest |