committed by
Carlos D. Álvaro
parent
961b1c5e00
commit
d033dfab3c
8
.github/workflows/build-and-test.yml
vendored
8
.github/workflows/build-and-test.yml
vendored
@@ -26,10 +26,10 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2.1.0
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.5.0
|
uses: docker/setup-buildx-action@v2
|
||||||
with:
|
with:
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
|
|
||||||
@@ -60,11 +60,13 @@ jobs:
|
|||||||
echo "Cache contents available at: ${CACHE_PATH}"
|
echo "Cache contents available at: ${CACHE_PATH}"
|
||||||
|
|
||||||
- name: Build docker-salt-master image
|
- name: Build docker-salt-master image
|
||||||
uses: docker/build-push-action@v4.0.0
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
outputs: |
|
||||||
|
type=image,annotation-index.org.opencontainers.image.description=salt-master latest containerized
|
||||||
cache-from: |
|
cache-from: |
|
||||||
type=local,src=${{ env.CACHE_PATH }}
|
type=local,src=${{ env.CACHE_PATH }}
|
||||||
ghcr.io/cdalvaro/docker-salt-master:latest
|
ghcr.io/cdalvaro/docker-salt-master:latest
|
||||||
|
|||||||
22
.github/workflows/publish.yml
vendored
22
.github/workflows/publish.yml
vendored
@@ -29,6 +29,7 @@ jobs:
|
|||||||
tags: ${{ steps.tags.outputs.tags }}
|
tags: ${{ steps.tags.outputs.tags }}
|
||||||
vcs_ref: ${{ steps.vcs_ref.outputs.vcs_ref }}
|
vcs_ref: ${{ steps.vcs_ref.outputs.vcs_ref }}
|
||||||
created_on: ${{ steps.created_on.outputs.created_on }}
|
created_on: ${{ steps.created_on.outputs.created_on }}
|
||||||
|
salt_version: ${{ steps.salt_version.outputs.salt_version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Image Tags
|
- name: Image Tags
|
||||||
id: tags
|
id: tags
|
||||||
@@ -62,6 +63,13 @@ jobs:
|
|||||||
echo "Created on: ${CREATED_ON}"
|
echo "Created on: ${CREATED_ON}"
|
||||||
echo "created_on=${CREATED_ON}" >> $GITHUB_OUTPUT
|
echo "created_on=${CREATED_ON}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Salt Version
|
||||||
|
id: salt_version
|
||||||
|
run: |
|
||||||
|
SALT_VERSION=$(cat VERSION)
|
||||||
|
echo "Salt Version: ${SALT_VERSION}"
|
||||||
|
echo "salt_version=${SALT_VERSION}"
|
||||||
|
|
||||||
- name: Dump environment
|
- name: Dump environment
|
||||||
if: contains(toJSON(github.event.commits.*.message), 'ci(debug)') == true
|
if: contains(toJSON(github.event.commits.*.message), 'ci(debug)') == true
|
||||||
run: env | sort
|
run: env | sort
|
||||||
@@ -81,10 +89,10 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2.1.0
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.5.0
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Cache Docker layers
|
- name: Cache Docker layers
|
||||||
id: cache-docker-layers
|
id: cache-docker-layers
|
||||||
@@ -107,27 +115,27 @@ jobs:
|
|||||||
echo "Cache contents available at: ${CACHE_PATH}"
|
echo "Cache contents available at: ${CACHE_PATH}"
|
||||||
|
|
||||||
- name: Login to Docker Container Registry
|
- name: Login to Docker Container Registry
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.CR_PAT }}
|
password: ${{ secrets.CR_PAT }}
|
||||||
|
|
||||||
- name: Login to Quay.io Container Registry
|
- name: Login to Quay.io Container Registry
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
username: ${{ secrets.QUAYIO_USERNAME }}
|
username: ${{ secrets.QUAYIO_USERNAME }}
|
||||||
password: ${{ secrets.QUAYIO_PASSWORD }}
|
password: ${{ secrets.QUAYIO_PASSWORD }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/build-push-action@v4.0.0
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
@@ -135,6 +143,8 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
VCS_REF=${{ needs.metadata.outputs.vcs_ref }}
|
VCS_REF=${{ needs.metadata.outputs.vcs_ref }}
|
||||||
BUILD_DATE=${{ needs.metadata.outputs.created_on }}
|
BUILD_DATE=${{ needs.metadata.outputs.created_on }}
|
||||||
|
outputs: |
|
||||||
|
type=image,annotation-index.org.opencontainers.image.description=salt-master ${{ needs.metadata.outputs.salt_version }} containerized
|
||||||
cache-from: |
|
cache-from: |
|
||||||
type=local,src=${{ env.CACHE_PATH }}
|
type=local,src=${{ env.CACHE_PATH }}
|
||||||
ghcr.io/cdalvaro/docker-salt-master:latest
|
ghcr.io/cdalvaro/docker-salt-master:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user