Merge pull request #243 from Darkfella91/renovate/getsops-sops-3.x #108
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: Docker Image CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.devcontainer/Dockerfile' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Image version | |
shell: bash | |
run: echo "VERSION=$(cat .devcontainer/version.txt)" >> $GITHUB_ENV | |
- name: Lowercase repository owner | |
shell: bash | |
run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry (GHCR) | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: | | |
ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/devcontainer:latest | |
ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/devcontainer:${{ env.VERSION }} | |
platforms: linux/amd64 | |
file: .devcontainer/Dockerfile | |
context: . |