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